在centos7及以后,重要的改變就是使用systemd管理機制,目前大多數linux發行版都支持systemd管理機制,
所以systemd不僅能夠初始化系統開機,還能管理linux系統服務,
為了便于linux用戶作業系統服務的管理,systemd提供了systemctl命令工具進行systemd的各項操作,
常用功能:啟動start、停止stop、重啟服務restart,任何一個軟體或者服務,你都可以嘗試著敲入命令systemctl restart 服務名.service
例如:
systemctl start httpd.service 啟動 httpd服務
systemctl stop httpd.service 停止 httpd服務
systemctl restart httpd.service 重新啟動服務
systemctl try-start httpd.service 服務在運行狀態下重新啟動服務
systemctl reload httpd.service 重新加載組態檔
查看、禁止、啟用服務
systemctl endable httpd.service 表示httpd服務開機啟動
systemctl disable httpd.service 表示httpd服務開機關閉
systemctl status httpd.service 查看httpd服務狀態,是否開啟
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/235288.html
標籤:其他
上一篇:三、Linux正確關機
下一篇:一、常見名詞理解
