Systemd 的簡介和特點
Systemd 是 Linux 系統中最新的初始化系統(init),它主要的設計目標是克服 sysvinit 固有的缺點,提高系統的啟動速度。

舊版sysvinit與新版systemd指令對照

啟動服務:

systemctl start httpd
systemctl start httpd.service

停止服務:

systemctl stop httpd
systemctl stop httpd.service

重啟服務(先停止,後啟動):

systemctl restart httpd

重新載入(使用新的設定檔):

systemctl reload httpd

顯示服務狀態:

systemctl status httpd

與此同時,之前用於設定系統啟動時自動運行某服務的指令 chkconfig 也改了,還是用systemctl。

chkconfig service on

改成了,

systemctl enable httpd
systemctl enable httpd.service

系統啟動時自動關閉服務

chkconfig service off

改成了,

systemctl disable httpd

檢查服務狀態

chkconfig service

改成了,

systemctl is-enabled httpd

列舉出所有服務的指令,

chkconfig –list

改成了,

systemctl list-unit-files --type=service

By tony

自由軟體愛好者~喜歡不斷的思考各種問題,有新的事物都會想去學習嘗試 做實驗並熱衷研究 沒有所謂頂天的技術 只有謙虛及不斷的學習 精進專業,本站主要以分享系統及網路相關知識、資源而建立。 Github http://stnet253.github.io

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

這個網站採用 Akismet 服務減少垃圾留言。進一步了解 Akismet 如何處理網站訪客的留言資料