Difference between revisions of "Systemd FAQ (简体中文)"

From ArchWiki
Jump to: navigation, search
(常见问题: Update translation.)
(3 intermediate revisions by one other user not shown)
Line 2: Line 2:
 
[[Category:Boot process (简体中文)]]
 
[[Category:Boot process (简体中文)]]
 
[[en:Systemd FAQ]]
 
[[en:Systemd FAQ]]
 +
[[es:Systemd FAQ]]
 +
[[it:Systemd FAQ]]
 +
{{TranslationStatus (简体中文)|Systemd_FAQ|2012-11-05|232403}}
 
== 常见问题 ==
 
== 常见问题 ==
 
最新的已知问题,参见:[http://cgit.freedesktop.org/systemd/systemd/tree/TODO TODO]。
 
最新的已知问题,参见:[http://cgit.freedesktop.org/systemd/systemd/tree/TODO TODO]。
Line 16: Line 19:
  
 
  # ln -sf /usr/lib/systemd/system/getty@.service /etc/systemd/system/getty.target.wants/getty@tty9.service
 
  # ln -sf /usr/lib/systemd/system/getty@.service /etc/systemd/system/getty.target.wants/getty@tty9.service
# systemctl daemon-reload
 
 
  # systemctl start getty@tty9.service
 
  # systemctl start getty@tty9.service
  
Line 24: Line 26:
  
 
  # rm /etc/systemd/system/getty.target.wants/getty@tty5.service /etc/systemd/system/getty.target.wants/getty@tty6.service
 
  # rm /etc/systemd/system/getty.target.wants/getty@tty5.service /etc/systemd/system/getty.target.wants/getty@tty6.service
# systemctl daemon-reload
 
 
  # systemctl stop getty@tty5.service getty@tty6.service
 
  # systemctl stop getty@tty5.service getty@tty6.service
  
Users may also change the number of gettys by editing {{ic|/etc/systemd/logind.conf}} and changing the value of {{ic|NAutoVTs}}. By doing it this way, the on-demand spawning will be preserved, whereas the above method will simply have the gettys running from boot.
+
用户也可以通过编辑{{ic|/etc/systemd/logind.conf}},将{{ic|NAutoVTs}}修改为需要的 TTY 个数。用这种方式,按需启动将会保持,而之前的方式将会在启动时就启动 TTY.
  
 
systemd 不使用 {{ic|/etc/inittab}} 文件。
 
systemd 不使用 {{ic|/etc/inittab}} 文件。
Line 44: Line 45:
 
|answer=自己写一个 getty@tty1.service 文件
 
|answer=自己写一个 getty@tty1.service 文件
  
把 {{ic|/usr/lib/systemd/system/getty@.service}} 复制到 {{ic|/etc/systemd/system/getty.target.wants/getty@tty1.service}},修改 {{ic|TTYVTDisallocate}} 为 {{ic|no}}.
+
把 {{ic|/usr/lib/systemd/system/getty@.service}} 复制到 {{ic|/etc/systemd/system/getty@tty1.service}},修改 {{ic|TTYVTDisallocate}} 为 {{ic|no}}.
 
}}
 
}}
  
Line 51: Line 52:
 
|answer=systemd 不支持 2.6.39 版本之前的内核。
 
|answer=systemd 不支持 2.6.39 版本之前的内核。
  
这里有一些必须/推荐的编译设置,但并不全:
+
这里有一些必须/推荐的编译设置,可能不全:
 
+
{{bc|1='''General setup'''
 +
CONFIG_FHANDLE=y
 
  CONFIG_AUDIT=y (recommended)
 
  CONFIG_AUDIT=y (recommended)
  CONFIG_AUDIT_LOGINUID_IMMUTABLE=y (not required, may break sysvinit compat)
+
  CONFIG_AUDIT_LOGINUID_IMMUTABLE=y (not required, may break sysvinit compatibility)
 
  CONFIG_CGROUPS=y
 
  CONFIG_CGROUPS=y
 +
'''-> Namespaces support'''
 +
    CONFIG_NET_NS=y (for private network)
 +
'''Networking support -> Networking options'''
 
  CONFIG_IPV6=[y<nowiki>|</nowiki>m] (highly recommended)
 
  CONFIG_IPV6=[y<nowiki>|</nowiki>m] (highly recommended)
  CONFIG_UEVENT_HELPER_PATH=""
+
'''Device Drivers'''
CONFIG_DEVTMPFS=y
+
  '''-> Generic Driver Options'''
CONFIG_DEVTMPFS_MOUNT=y (required if you don't use an initramfs)
+
    CONFIG_UEVENT_HELPER_PATH=""
  CONFIG_RTC_DRV_CMOS=y (highly recommended)
+
    CONFIG_DEVTMPFS=y
 +
    CONFIG_DEVTMPFS_MOUNT=y (required if you don't use an initramfs)
 +
  '''-> Real Time Clock'''
 +
    CONFIG_RTC_DRV_CMOS=y (highly recommended)
 +
'''File systems'''
 
  CONFIG_FANOTIFY=y (required for readahead)
 
  CONFIG_FANOTIFY=y (required for readahead)
 
  CONFIG_AUTOFS4_FS=[y<nowiki>|</nowiki>m]
 
  CONFIG_AUTOFS4_FS=[y<nowiki>|</nowiki>m]
  CONFIG_TMPFS_POSIX_ACL=y (recommended, if you want to use pam_systemd.so)
+
  '''-> Pseudo filesystems'''
CONFIG_NAMESPACES=y (for Private*=yes)
+
    CONFIG_TMPFS_POSIX_ACL=y (recommended, if you want to use pam_systemd.so)}}
CONFIG_NET_NS=y (for PrivateNetwork=yes)
+
CONFIG_FHANDLE=y
+
 
}}
 
}}
  
Line 84: Line 91:
  
 
{{FAQ
 
{{FAQ
|question=After migrating to systemd, why won't my fakeRAID mount?
+
|question=切换到 systemd 后,为什么 fakeRAID 没有挂载?
|answer=Be sure you use {{bc|# systemctl enable dmraid.service}}
+
|answer=请确保使用了{{bc|# systemctl enable dmraid.service}}
 
}}
 
}}
  
Line 107: Line 114:
  
 
{{FAQ
 
{{FAQ
|question=Status of .service says "active (exited)" in green. (e.g. iptables)
+
|question=.service 状态显示绿色的 "active (exited)" (例如 iptables)
|answer=This is perfectly normal. In the case with iptables it is because there is no daemon to run, it is controlled in the kernel. Therefore, it exits after the rules have been loaded.
+
|answer=这很正常,本例中的 iptables 并不是守护进程,而是由内核控制,所以装载完规则后自动退出了。通过下面命令检查规则是否正确加载
 
+
To check if your iptables rules have been loaded properly:
+
  
 
{{bc|# iptables --list}}}}
 
{{bc|# iptables --list}}}}
  
 
{{FAQ
 
{{FAQ
|question={{ic|Failed to issue method call: File exists}} error
+
|question={{ic|Failed to issue method call: File exists}} 错误
|answer=This happens when using {{ic|systemctl enable}} and the symlink it tries to create in {{ic|/etc/systemd/system/}} already exists. Typically this happens when switching from one display manager to another one (for instance GDM to KDM, which can be enabled with {{ic|gdm.service}} and {{ic|kdm.service}}, respectively) and the corresponding symlink {{ic|/etc/systemd/system/display-manager.service}} already exists.
+
|answer=此错误一般发生在{{ic|systemctl enable}}创建系统连接到{{ic|/etc/systemd/system/}}的时候。一般是在切换显示管理器(例如从 GDM KDM)时出现,这时{{ic|/etc/systemd/system/display-manager.service}} 已经存在。
  
To solve this problem, use {{ic|systemctl -f enable}} to overwrite an existing symlink.}}
+
要解决此问题,使用 {{ic|systemctl -f enable}} 覆盖原有链接。}}

Revision as of 19:17, 13 November 2012

翻译状态: 本文是英文页面 Systemd_FAQ翻译,最后翻译时间:2012-11-05,点击这里可以查看翻译后英文页面的改动。

常见问题

最新的已知问题,参见:TODO

Template:FAQ

Template:FAQ

Template:FAQ

Template:FAQ

Template:FAQ

Template:FAQ

Template:FAQ

Template:FAQ

Template:FAQ

Template:FAQ

Template:FAQ