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 |