Service后台服务管理

基本语法

service  服务名  start  开启服务

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

service  服务名  stop  关闭服务

service  服务名  restart  重启服务

service  服务名  status  查看服务状态

 

  chkconfig设置否太服务的自启配置

基本语法

chkconfig          查看所有服务器自启配置

chkconfig  服务名  off  关掉指定服务的自动启动

chkconfig  服务名  on  开启指定服务的自动启动

chkconfig  服务名  --list  查看服务开机启动状态

 

  关闭防火墙

1.临时关闭防火墙

  (1)查看防火墙状态

      service  iptables  status

  (2)临时关闭防火墙

      service  iptables  stop

2.开机启动时关闭防火墙

  (1)查看防火墙开机启动状态

      chkconfig  iptables  --list

  (2)设置开机时关闭防火墙

      chkconfig  iptables  off

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄