mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-25 23:11:02 +08:00
[完成翻译] 5 best linux init system
This commit is contained in:
parent
331781c50b
commit
04e27f0a0b
@ -1,105 +0,0 @@
|
||||
GHLandy Translating
|
||||
|
||||
5 Best Modern Linux ‘init’ Systems (1992-2015)
|
||||
============================================
|
||||
|
||||
In Linux and other Unix-like operating systems, the init (initialization) process is the first process executed by the kernel at boot time. It has a process ID (PID) of 1, it is executed in the background until the system is shut down.
|
||||
|
||||
The init process starts all other processes, that is daemons, services and other background processes, therefore, it is the mother of all other processes on the system. A process can start many other child processes on the system, but in the event that a parent process dies, init becomes the parent of the orphan process.
|
||||
|
||||
![](http://www.tecmint.com/wp-content/uploads/2016/08/Linux-init-Systems.png)
|
||||
|
||||
Over the years, many init systems have emerged in major Linux distributions and in this guide, we shall take a look at some of the best init systems you can work with on the Linux operating system.
|
||||
|
||||
### 1. System V Init
|
||||
|
||||
System V (SysV) is a mature and popular init scheme on Unix-like operating systems, it is the parent of all processes on a Unix/Linux system. SysV is the first commercial Unix operating system designed.
|
||||
|
||||
Almost all Linux distributions first used SysV init scheme except Gentoo which has a custom init and Slackware using BSD-style init scheme.
|
||||
|
||||
As years have passed by, due to some imperfections, several SysV init replacements have been developed in quests to create more efficient and perfect init systems for Linux.
|
||||
|
||||
Although these alternatives seek to improve SysV and probably offer new features, they are still compatible with original SysV init scripts.
|
||||
|
||||
### 2. SystemD
|
||||
|
||||
SystemD is a relatively new init scheme on the Linux platform. Introduced in Fedora 15, its is an assortment of tools for easy system management. The main purpose is to initialize, manage and keep track of all system processes in the boot process and while the system is running.
|
||||
|
||||
Systemd init is comprehensively distinct from other traditional Unix init systems, in the way it practically approaches system and services management. It is also compatible with SysV and LBS init scripts.
|
||||
|
||||
It has some of the following eminent features:
|
||||
|
||||
- Clean, straightforward and efficient design
|
||||
- Concurrent and parallel processing at bootup
|
||||
- Better APIv
|
||||
- Enables removal of optional processes
|
||||
- Supports event logging using journald
|
||||
- Supports job scheduling using systemd calender timers
|
||||
- Storage of logs in binary files
|
||||
- Preservation of systemd state for future reference
|
||||
- Better integration with GNOME plus many more
|
||||
|
||||
Read the Systemd init Overview: <https://fedoraproject.org/wiki/Systemd>
|
||||
|
||||
### 3. Upstart
|
||||
|
||||
Upstart is an event-based init system developed by makers of Ubuntu as a replacement for SysV init system. It starts different system tasks and processes, inspects them while the system is running and stops them during system shut down.
|
||||
|
||||
It is a hybrid init system which uses both SysV startup scripts and also Systemd scripts, some of the notable features of Upstart init system include:
|
||||
|
||||
- Originally developed for Ubuntu Linux but can run on all other distributions
|
||||
- Event-based starting and stopping of tasks and services
|
||||
- Events are generated during starting and stopping of tasks and services
|
||||
- Events can be sent by other system processes
|
||||
- Communication with init process through D-Bus
|
||||
- Users can start and stop their own processes
|
||||
- Re-spawning of services that die abruptly and many more
|
||||
|
||||
Visit Homepage: <http://upstart.ubuntu.com/index.html>
|
||||
|
||||
### 4. OpenRC
|
||||
|
||||
OpenRC is a dependency-based init scheme for Unix-like operating systems, it is compatible with SysV init. As much as it brings some improvements to Sys V, you must keep in mind that OpenRC is not an absolute replacement for /sbin/init file.
|
||||
|
||||
It offers some illustrious features and these include:
|
||||
|
||||
- It can run on other many Linux distributions including Gentoo and also on BSD
|
||||
- Supports hardware initiated init scripts
|
||||
- Supports a single configuration file
|
||||
- No per-service configurations supported
|
||||
- Runs as a daemon
|
||||
- Parallel services startup and many more
|
||||
|
||||
Visit Homepage: <https://wiki.gentoo.org/wiki/OpenRC>
|
||||
|
||||
### 5. runit
|
||||
|
||||
runit is also a cross-platform init system that can run on GNU/Linux, Solaris, *BSD and Mac OS X and it is an alternative for SysV init, that offers service supervision.
|
||||
|
||||
It comes with some benefits and remarkable components not found in SysV init and possibly other init systems in Linux and these include:
|
||||
|
||||
Service supervision, where each service is associated with a service directory
|
||||
Clean process state, it guarantees each process a clean state
|
||||
It has a reliable logging facility
|
||||
Fast system boot up and shutdown
|
||||
It is also portable
|
||||
Packaging friendly
|
||||
Small code size and many more
|
||||
Visit Homepage: <http://smarden.org/runit/>
|
||||
|
||||
As I had earlier on mentioned, the init system starts and manages all other processes on a Linux system. Additionally, SysV is the primary init scheme on Linux operating systems, but due to some performance weaknesses, system programmers have developed several replacements for it.
|
||||
|
||||
And here, we looked at a few of those replacements, but there could be other init systems that you think are worth mentioning in this list. You can let us know of them via the comment section below.
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.tecmint.com/best-linux-init-systems/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+tecmint+%28Tecmint%3A+Linux+Howto%27s+Guide%29
|
||||
|
||||
作者:[Aaron Kili ][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: http://www.tecmint.com/author/aaronkili/
|
103
translated/tech/20160811 5 best linux init system.md
Normal file
103
translated/tech/20160811 5 best linux init system.md
Normal file
@ -0,0 +1,103 @@
|
||||
现代 Linux 的五大初始化系统 (1992-2015)
|
||||
============================================
|
||||
|
||||
在 Linux 和其他类 Uniux 系统中,init(初始化)进程是系统启动时由内核执行的第一个进程,其进程 ID(PID)为 1,并静默的运行在后台,知道系统关闭。
|
||||
|
||||
init 进程负责启动其他所有的进程,比如守护进程、服务和其他后台进程,因此,它是系统中其他所有进程的父进程。某个进程可以启动许多个子进程,但在这个过程中,某个子进程的父进程结束之后,该子进程的父进程会变成 init 进程。
|
||||
|
||||
![](http://www.tecmint.com/wp-content/uploads/2016/08/Linux-init-Systems.png)
|
||||
|
||||
这么多年过去了,许多的初始化系统在主流 Linux 和本文中脱颖而出,我将你过一遍在 Linux 操作系统最好的初始化系统。
|
||||
|
||||
### 1. System V Init
|
||||
|
||||
System V (SysV) 是一个在类 Unix 系统中最为成熟而且大受欢迎的初始化方案,是 Unix/Linux 系统中所有进程的父进程。SysV 是第一个商业 Unix 系统的初始化设计方案。
|
||||
|
||||
除了 Gentoo 使用自主的初始化系统、Slackware 使用 BSD 风格的初始化方案外,几乎所有的 Linux 发行版都率先使用 SysV 作为初始化方案。
|
||||
|
||||
随着时间的推移,由于一些设计上的缺陷,有几个 SysV 初始化替换方案已经开发出来,用以为 Linux 创建更加高效和完美的初始化系统。
|
||||
|
||||
尽管这些替代方案都超越了 SysV 并提供了更多新特性,但它们仍然和原始 SysV 初始化脚本保持兼容。
|
||||
|
||||
### 2. SystemD
|
||||
|
||||
SystemD 是一个 Linux 平台中相对较新的初始化方案。以 Fedora 15 为例,它集成了各类工具,用以更好的管理系统。主要目的是:系统初始化、管理和跟踪 boot 进程中和系统运行时所有的系统进程。
|
||||
|
||||
Systemd 是全面有别于其他传统的 Unix 初始化系统的,特别是再启动系统和服务管理方面。它同样兼容 SysV 和 LBS 初始化脚本。
|
||||
|
||||
其中较为突出的特性如下:
|
||||
|
||||
- 纯粹,简单,高效的设计
|
||||
- 启动时的并发和并行处理
|
||||
- 更好的 API
|
||||
- 开启可选进程的移除功能
|
||||
- 使用 journald 来支持时间日志
|
||||
- 使用 systemd calender timers 来支持任务计划
|
||||
- 以二进制文件存储日志
|
||||
- 保存 systemd 以待今后查看
|
||||
- 与 GNOME 更好整合实现等
|
||||
|
||||
查看 Systemd 初始化系统简介:<https://fedoraproject.org/wiki/Systemd>
|
||||
|
||||
### 3. Upstart
|
||||
|
||||
Upstart 是一个基于事件的初始化系统,由 Ubuntu 的制作团队开发的,用以替代 SysV。它可以启动不同的系统任务和进程、在系统运行时校验进程并在系统关闭时结束进程。
|
||||
|
||||
它是一个使用 SysV 和 Systemd 启动脚本的混合初始化系统,Upstart 中值得一提的特性如下:
|
||||
|
||||
- Ubuntu 的原生初始化系统,但可以运行在其他所有的发行版中
|
||||
- 基于事件启动/结束任务和服务
|
||||
- 启动/结束任务和服务是生成事件
|
||||
- 可以由其他系统进程发送事件
|
||||
- 使用 D-Bus 和 init 进程通信
|
||||
- 用户可以启动/结束其各自的进程
|
||||
- 再现崩溃进程等
|
||||
|
||||
访问 Upstart 主页:<http://upstart.ubuntu.com/index.html>
|
||||
|
||||
### 4. OpenRC
|
||||
|
||||
OpenRC 是一个基于依赖关系的类 Unix 系统初始化方案,兼容 SysV。基本可以说是 SysV 的升级版,但必须要清楚记住的是:OpenRC 并非只是完全替代 /sbin/init 文件。
|
||||
|
||||
它所提供的出色特性如下:
|
||||
|
||||
- 可运行在包括 Gentoo 和 BSD 的多数 Linux 系统之中
|
||||
- 支持硬件发起的初始化脚步
|
||||
- 支持单个配置文件
|
||||
- 不支持单个服务配置
|
||||
- 以守护进程的方式运行
|
||||
- 并行服务启动等
|
||||
|
||||
访问 OpenRC 主页:<https://wiki.gentoo.org/wiki/OpenRC>
|
||||
|
||||
### 5. runit
|
||||
|
||||
runit 同样是一个跨平台初始化系统,可以运行在 GNU/Linux、Solaris、BSD 和Mac OS X 中,用替代 SysV,同时提供服务监控。
|
||||
|
||||
相比于 SysV 和其他 Linux 初始化系统,它提供了一些好用和卓越的组件,如下:
|
||||
|
||||
- 服务监控:每个服务都关联一个服务目录
|
||||
- 清理进程状态,以保证每个进程的干净状态
|
||||
- 可靠的日志机制
|
||||
- 快速的系统启动和关闭
|
||||
- 可移植
|
||||
- 包的友好性
|
||||
- 小体积代码等
|
||||
|
||||
访问 runit 主页:<http://smarden.org/runit/>
|
||||
|
||||
正如我之前所说的,Linux 中的初始化系统负责启动和管理所有的进程。此外,SysV 是 Linux 系统中最基本的初始化系统,但由于一些性能缺陷,系统开发者必然会开发出几个替代品。
|
||||
|
||||
在这里,我已经介绍了几个可用的替代方案,但你可能觉得有一些其他的初始化系统值得在此提及。请在下方的评论区将你的想法告诉我们。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.tecmint.com/best-linux-init-systems/
|
||||
|
||||
作者:[Aaron Kili ](http://www.tecmint.com/author/aaronkili/)
|
||||
译者:[GHlandy](https://github.com/GHlandy)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user