CentOS 7繼承了RHEL 7的新的特性,例如強大的systemctl,而systemctl的使用也使得系統服務的/etc/init.d的啟動腳本的方式產生重大改變,也大幅提高了系統服務的運行效力。但服務的配置和以往也產生了極大的不同,變的簡單而易用了許多(仁者見仁,米撲博客)。
systemd提供更優秀的框架以表示系統服務間的依賴關系,實現系統初始化時服務的并行啟動,同時到達下降Shell的系統開消的效果。
systemd 目標是:盡量啟動更少進程;盡量將更多進程并行啟動,systemd盡量減少對shell腳本的依賴。
systemd單位類型
systemctl –type=單位類型,用來過濾單位,
例如: systemctl –type=service
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | [root@mimvp_usa ~] # systemctl --type=service UNIT LOAD ACTIVE SUB DESCRIPTION aegis.service loaded active running LSB: aegis update. agentwatch.service loaded active exited SYSV: Starts and stops guest agent aliyun.service loaded active running auto run aliyunservice or agent crond.service loaded active running Command Scheduler dbus.service loaded active running D-Bus System Message Bus getty@tty1.service loaded active running Getty on tty1 httpd.service loaded active running The Apache HTTP Server kmod-static-nodes.service loaded active exited Create list of required static device nodes for the current kernel lvm2-lvmetad.service loaded active running LVM2 metadata daemon lvm2-monitor.service loaded active exited Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress mariadb.service loaded active running MariaDB database server |