说明
CentOS 7.x开始,CentOS开始使用systemd服务来代替daemon,原来管理系统启动和管理系统服务的相关命令全部由systemctl命令来代替
原来的 service 命令与 systemctl 命令对比
daemon命令 | systemctl命令 | 说明 |
---|---|---|
service [服务] start | systemctl start [unit type] | 启动 |
service [服务] stop | systemctl stop [unit type] | 停止 |
service [服务] restart | systemctl restart [unit type] | 重启 |
此外,systemctl 增加了新的参数命令
- status:查看服务运行情况
- eload:重新加载服务,加载更新后的配置文件(并不是所有服务都支持这个参数,比如network.service)
等…
转自:https://blog.csdn.net/u012486840/article/details/53161574