以httpd為例子:
| 指令名稱 | centos 6 | centos 7 |
|---|---|---|
| 啟動服務 | service httpd start | systemctl start httpd.service |
| 關閉服務 | service httpd stop | systemctl stop httpd.service |
| 重啟服務 | service httpd restart | systemctl restart httpd.service |
| 查看服務狀態 | service httpd status | systemctl status httpd.service |
| 設置服務開機啟動 | chkconfig httpd on | systemctl enable httpd.service |
| 設置服務開機關閉 | chkconfig httpd off | systemctl disable httpd.service |
| 查看服務開機啟動 | chkconfig –list | systemctl list-units –type=service |
