本站教程收集整理的这篇文章主要介绍了Centos-服务管理-systemctl,本站教程本站觉得挺不错的,现在分享给大家,也给大家做个参考。
systemctl命令属于systemd软件包,这个软件包不仅可以完成系统的初始化工作,还能对系统和服务进行管理
在centos7中,服务单元取代启动脚本,服务单元以.service为文件扩展名,配置文件为 /etc/systemd,相当于Centos7版本前的service chkconfig命令组合
# namd.service?表示各服务的服务单元
1.?启动服务 start
systemctl start named.service
2.?停止服务 stop
systemctl stop named.service
便宜香港vps3.?如果服务未运行则启动,服务运行则重启 restart
systemctl restart?NAMEd.service
4.?只有在服务运行态时候才能重启服务 try-start
systemctl try-start named.service
5.?优雅重启 reload
systemctl reload?NAMEd.service
6.?开机自启动 enable
systemctl?enable named.service
7.?禁止开机自启动 disable
systemctl?disable named.service
8.?查看服务运行状态 status
systemctl status named.service
本站总结
以上是本站教程为你收集整理的Centos-服务管理-systemctl全部内容,希望文章能够帮你解决Centos-服务管理-systemctl所遇到的程序开发问题。
如果觉得本站教程网站内容还不错,欢迎将本站教程推荐给好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。