systemctl 簡易使用
動作 服務名.service
一些centos7 systemctl命令簡單實用實例:
systemctl start httpd.service /啟動Apache httpd
systemctl restart httpd.service /重新啟動
systemctl stop httpd.service /停止服務
systemctl enable httpd.service /開機啟動httpd
systemctl disable httpd.service /禁止開機啟動httpd
systemctl status httpd /顯示服務狀態
systemctl is-active httpd /顯示服務狀態
systemctl list-unit-files | grep httpd /列出 httpd Server 啟動狀態
參考:http://www.vpsboke.com/manage/centos7-service-systemctl-command/