1. 背景
首先,我们先看一下/etc/init.d/README
内容:
You are looking for the traditional init scripts in /etc/rc.d/init.d,
and they are gone?
Here's an explanation on what's going on:
You are running a systemd-based OS where traditional init scripts have
been replaced by native systemd services files. Service files provide
very similar functionality to init scripts. To make use of service
files simply invoke "systemctl", which will output a list of all
currently running services (and other units). Use "systemctl
list-unit-files" to get a listing of all known unit files, including
stopped, disabled and masked ones. Use "systemctl start
foobar.service" and "systemctl stop foobar.service" to start or stop a
service, respectively. For further details, please refer to
systemctl(1).
Note that traditional init scripts continue to function on a systemd
system. An init script /etc/rc.d/init.d/foobar is implicitly mapped
into a service unit foobar.service during system initialization.
根据上面的解释,目前RED HAT 7, Centos 7等都采用systemd方式来作为系统初始化工具.
2. 为何替换使用systemd
systemd
通过并行启动服务来加速系统启动时间;systemd
使用Cgroup
可以更好的管理程序,同时也能控制执行环境;systemd
通过结合journald
达到更好的日志机制,这种日志方式在Red Hat Enterprise Linux 7中引入;systemd
可以处理系统配置动态调整;
原文地址:https://blog.csdn.net/heiyouhei123/article/details/89061524
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。