CentOS6
服务管理
service 服务名 start
service 服务名 stop
service 服务名 restart
service 服务名 reload
service 服务名 status
查看服务
/ect/init.d/服务名
设置自启动
chkconfig --list|grep xxx
chkconfig --level 5 服务名 on
CentOS7
服务管理
systemctl start 服务名
systemctl stop 服务名
systemctl restart 服务名
systemctl reload 服务名
systemctl status 服务名
查看服务方法
/usr/lib/systemd/system
查看服务命令
systemctl list -unit-files | grep 服务名
systemctl --type service | grep 服务名
设置自启动
systemctl enable 服务名
systemctl disable 服务名