红联Linux门户
Linux帮助

CentOS 7(RHEL 7)服务管理命令的变化

发布时间:2016-04-13 10:13:37来源:linux网站作者:harbor1981

CentOS 7 (RHEL 7)带来了新的服务管理命令,为了保持兼容原有的命令仍可以使用,以下是新旧命令的对照。


启动、停止、重启、重载、检查服务:
6: service httpd start|stop|restart|reload|status
7: systemctl start|stop|restart|reload|status httpd.service


允许、禁止服务自启动:
6: chkconfig httpd on|off
7: system enable|disable httpd.service


列出服务:
6: chkconfig –list
7: systemctl list-unit-files –type=service 或 ls /etc/systemd/system/*.wants/


添加服务:
6: chkconfig httpd –add
7: systemctl daemon-reload


本文永久更新地址:http://www.linuxdiyf.com/linux/19732.html