1. 程式人生 > >centos7的服務管理

centos7的服務管理

開機 centos7 style off col span -c httpd color

1,啟動服務(每條都可以)
systemctl start httpd
systemctl start httpd.service
service httpd start

2,停止服務
systemctl stop httpd
systemctl stop httpd.service
service httpd stop

3,重啟服務
systemctl restart httpd
systemctl restart httpd.service
serivce httpd restart

4,查看服務運行狀態
systemctl status httpd
systemctl status httpd.service
service httpd status

5,重新讀取配置文件
systemctl reload httpd
systemctl reload httpd.service

6,設置服務為開機自啟動
查看:systemctl is-enabled httpd
設置為自啟動:systemctl enable httpd
關閉自啟動: systemctl disalbe httpd

7,關機
systemctl poweroff
重啟
systemctl reboot
待機
systemctl suspend

centos7的服務管理