日期:2014-05-16  浏览次数:20613 次

linux-service操作和管理

?

查看服务状态

service serviceName status

serviceName (pid 3711 3674) is running...

?

服务操作命令(启动,停止,重启)

service serviceName start|stop|restart

?

服务配置查看

chkconfig --list serviceName

serviceName??????? 0:off?? 1:off?? 2:on??? 3:on??? 4:on??? 5:on??? 6:off

2,3,4,5如果是on表示开机启动

服务配置关闭开机启动

chkconfig --level 2345 serviceName off|on

?

如:关闭sendmail服务,提高无互联网环境的linux启动速度

chkconfig --level 2345 sendmail off

?