systemd 架構圖
Systemd
<a href="https://www.freedesktop.org/software/systemd/" target="_blank">https://www.freedesktop.org/software/systemd/</a>
<a href="http://www.jinbuguo.com/systemd/systemd.html" target="_blank">http://www.jinbuguo.com/systemd/systemd.html</a>
中文手冊
<a href="https://www.ibm.com/developerworks/cn/linux/1407_liuming_init3/" target="_blank">https://www.ibm.com/developerworks/cn/linux/1407_liuming_init3/</a>
淺析systemd
<a href="https://www.freedesktop.org/wiki/Software/systemd/" target="_blank">https://www.freedesktop.org/wiki/Software/systemd/</a>
<a href="http://www.ruanyifeng.com/blog/2016/03/systemd-tutorial-commands.html" target="_blank">http://www.ruanyifeng.com/blog/2016/03/systemd-tutorial-commands.html</a>
systemd 指令詳解 (贊)
<a href="http://blog.jobbole.com/97248/" target="_blank">http://blog.jobbole.com/97248/</a>
簡明介紹 systemd
systemd提供更優秀的架構以表示系統服務間的依賴關系
實作系統初始化時服務的并行啟動,同時達到降低Shell的系統開銷的效果
systemd的目标是:盡可能啟動更少程序;盡可能将更多程序并行啟動。
systemd盡可能減少對shell腳本的依賴。
Systemd 是 Linux 系統中最新的初始化系統(init),它主要的設計目标是克服 sysvinit 固有的缺點,提高系統的啟動速度。systemd 和 ubuntu 的 upstart 是競争對手,預計會取代 UpStart,實際上在作者寫作本文時,已經有消息稱 Ubuntu 也将采用 systemd 作為其标準的系統初始化系統。
Systemd 的很多概念來源于蘋果 Mac OS 作業系統上的 launchd,不過 launchd 專用于蘋果系統,是以長期未能獲得應有的廣泛關注。Systemd 借鑒了很多 launchd 的思想,它的重要特性如下:
Systemd 是一個"新來的",Linux 上的很多應用程式并沒有來得及為它做相應的改變。和 UpStart 一樣,systemd 引入了新的配置方式,對應用程式的開發也有一些新的要求。如果 systemd 想替代目前正在運作的初始化系統,就必須和現有程式相容。任何一個 Linux 發行版都很難為了采用 systemd 而在短時間内将所有的服務代碼都修改一遍。
Systemd 提供了和 Sysvinit 以及 LSB initscripts 相容的特性。系統中已經存在的服務和程序無需修改。這降低了系統向 systemd 遷移的成本,使得 systemd 替換現有初始化系統成為可能。
Systemd 提供了比 UpStart 更激進的并行啟動能力,采用了 socket / D-Bus activation 等技術啟動服務。一個顯而易見的結果就是:更快的啟動速度。
為了減少系統啟動時間,systemd 的目标是:
盡可能啟動更少的程序
盡可能将更多程序并行啟動
<a href="https://blog.linuxeye.cn/400.html" target="_blank">https://blog.linuxeye.cn/400.html</a>
<a href="http://blog.csdn.net/smstong/article/details/39317491" target="_blank">http://blog.csdn.net/smstong/article/details/39317491</a>
常用指令
開機不啟動unit
systemctl disable httpd.service
删除/etc/systemd/system/multi-user.target.wants下的軟連結
檢視開機是否啟動
systemctl is-enabled xx.service #查詢服務是否開機啟動
systemd檢視開機自啟動的程式
相當于chkconfig --list
ls /etc/systemd/system/multi-user.target.wants/
檢視systemd單元加載及活動情況
systemctl
顯示啟動失敗的單元
systemctl --failed
檢視systemd管理的所有單元
systemctl list-unit-files
<a href="http://www.linuxidc.com/Linux/2016-04/130413.htm" target="_blank">http://www.linuxidc.com/Linux/2016-04/130413.htm</a>
<a href="http://www.linuxidc.com/Linux/2015-04/116648.htm" target="_blank">http://www.linuxidc.com/Linux/2015-04/116648.htm</a>
初次體驗CentOS 7的systemd
<a href="http://carllai.blog.51cto.com/1664997/1439562/" target="_blank">http://carllai.blog.51cto.com/1664997/1439562/</a>
本文轉自heavenseahill 51CTO部落格,原文連結:http://blog.51cto.com/shower/1972717,如需轉載請自行聯系原作者