From Fedora Project Wiki
No edit summary
Line 7: Line 7:


==介绍==
==介绍==
==systemd文档==
==文档==
==systemd特性==
==特性==
==工具==
==工具==
==内核启动命令行==
==内核启动命令行==
==Fedora中systemd的开发状态==
==Fedora 中systemd 的开发状态==
==System V init与systemd的对接==
==System V init 与systemd 的对接==
==systemd的服务管理程序==
==systemd 的服务管理程序==
==如何启动/关闭、开启/禁止服务?==
==如何启动/关闭、开启/禁止服务?==
==如何改变运行级别?==
==如何改变运行级别?==
Line 19: Line 19:
==如何查看当下运行级别?==
==如何查看当下运行级别?==
==如何关机?==
==如何关机?==
==<code>service</code>命令兼容systemd吗?==
==<code>service</code> 命令兼容systemd 吗?==
==<code>chkconfig</code>命令兼容systemd吗?==
==<code>chkconfig</code> 命令兼容systemd 吗?==
==<code>system-config-services</code>与systemd兼容吗?==
==<code>system-config-services</code> 与systemd 兼容吗?==
==如何改变默认gettys号?==
==如何改变默认gettys 号?==
==虚拟终端如何设置自动登录?==
==虚拟终端如何设置自动登录?==
==如何自定义或增加一个自定义''unit''文件?==
==如何自定义或增加一个自定义''unit'' 文件?==
''unit''文件在<code>/etc/systemd/system</code>下的优先级要高于<code>/lib/systemd/system</code>下的。按照个人的需求从后者移动道前者并进行自定义修改。
''unit''文件在<code>/etc/systemd/system</code>下的优先级要高于<code>/lib/systemd/system</code>下的。按照个人的需求从后者移动到前者并进行自定义修改。


If a line starts with .include followed by a file name, the specified file will be parsed at this point. Make sure that the file that is included has the appropiate section headers before any directives.
If a line starts with .include followed by a file name, the specified file will be parsed at this point. Make sure that the file that is included has the appropiate section headers before any directives.
Line 37: Line 37:
==如何调试系统事件?==
==如何调试系统事件?==
==预读功能==
==预读功能==
==关于<code>/usr</code>分区的警告==
==关于<code>/usr</code> 分区的警告==


详情请参考:
详情请参考:
Line 43: Line 43:
http://cgit.freedesktop.org/systemd/tree/README
http://cgit.freedesktop.org/systemd/tree/README


==man手册页==
==man 手册==
systemd 有多方面的文档,其中也包括一些man手册页。其网页版地址是:
systemd 有多方面的文档,其中也包括一些man手册页。其网页版地址是:
http://0pointer.de/public/systemd-man/
http://0pointer.de/public/systemd-man/

Revision as of 04:47, 16 March 2012

systemd 是Linux下一个与SysV和LSB init scripts兼容的系统和服务管理器。systemd 使用socket和D-Bus来开启服务,提供基于守护进程的按需启动策略,保留了Linux cgroups的进程追踪功能,支持快照和系统状态恢复,维护挂载和自挂载点,实现了各服务间基于从属关系的一个更为精细的逻辑控制,拥有前卫的并行性能。它也可以降级作为sysvinit的一个替代品。更多信息,请参考视频:http://linuxconfau.blip.tv/file/4696791/http://www.youtube.com/watch?v=TyMLi8QF6sw

为什么是systemd?

http://0pointer.de/blog/projects/why.html

介绍

文档

特性

工具

内核启动命令行

Fedora 中systemd 的开发状态

System V init 与systemd 的对接

systemd 的服务管理程序

如何启动/关闭、开启/禁止服务?

如何改变运行级别?

如何改变默认运行级别?

如何查看当下运行级别?

如何关机?

service 命令兼容systemd 吗?

chkconfig 命令兼容systemd 吗?

system-config-services 与systemd 兼容吗?

如何改变默认gettys 号?

虚拟终端如何设置自动登录?

如何自定义或增加一个自定义unit 文件?

unit文件在/etc/systemd/system下的优先级要高于/lib/systemd/system下的。按照个人的需求从后者移动到前者并进行自定义修改。

If a line starts with .include followed by a file name, the specified file will be parsed at this point. Make sure that the file that is included has the appropiate section headers before any directives.

You should use .include statement instead of copying the whole unit file from /lib/systemd/system to /etc/systemd/system if possible. This will enable to update the unchanged directives correctly during future package updates.

Be careful when using .include together with directives that can be defined multiple times (like EnvironmentFile=), since we can only add new directives, but we can't remove already defined ones. We have to copy the whole file from /lib/systemd/system to /etc/systemd/system in this case.

Let's say we use a lighttpd server and we want to lower its niceness value. All we need to do is to add Nice=-5 to the lighttpd.service file. We can do this by either copying the whole file from /lib/systemd/system/lighttpd.service to /etc/systemd/system/lighttpd.service or creating the following file in /etc/systemd/system/lighttpd.service:

如何调试系统事件?

预读功能

关于/usr 分区的警告

详情请参考: http://freedesktop.org/wiki/Software/systemd/separate-usr-is-brokenhttp://cgit.freedesktop.org/systemd/tree/README

man 手册

systemd 有多方面的文档,其中也包括一些man手册页。其网页版地址是: http://0pointer.de/public/systemd-man/

参考