硅云幫助文檔中心
搜索文檔
熱門搜索詞:
產(chǎn)品簡介
產(chǎn)品定價
入門指南
經(jīng)典案例
快照
常見問題
知識拓展
名詞解釋
API參考
Cenetos系統(tǒng)服務(wù)器檢查/設(shè)置服務(wù)運行情況的命令
Centos系統(tǒng)如何啟動/關(guān)閉某項服務(wù)?如何設(shè)置服務(wù)自動啟動?本文將主要列舉CentOS系統(tǒng)服務(wù)器中常用的服務(wù)相關(guān)命令。
因系統(tǒng)命令不同,命令也不同;一般Centos5.x/6.x使用舊命令、Centos7.x/8.x使用新命令:
任務(wù) | 舊命令 | 新命令 |
---|---|---|
使某服務(wù)開機自動啟動 | Chkconfig --level 3 httpd on | systemctl enable httpd.service |
使某服務(wù)開機不自動啟動 | chkconfig --level 3 httpd off | systemctl disable httpd.service |
檢查服務(wù)狀態(tài) | service httpd status | systemctl status httpd.service (服務(wù)詳細信息) systemctl is-active httpd.service(僅顯示是否Active) |
顯示所有已啟動的服務(wù) | chkconfig --list | systemctl list-unit-files systemctl list-units --type=service |
啟動某服務(wù) | service httpd start | systemctl start httpd.service |
停止某服務(wù) | service httpd stop | systemctl stop httpd.service |
重啟某服務(wù) | service httpd restart | systemctl restart httpd.service |
相關(guān)文檔
您對該文檔有什么建議?
本文導(dǎo)航