欧美AV无码一区二区,麻豆+无码+国产在线+观看,欧美狂躁少妇XXXX高潮无码,美女扒开屁股让男人桶免费观看,极品粉嫩国产18尤物在线播放

???? ????????? ?? Systemd: ??? ???????

???? ????? ?? Systemd: ????? ??????

???? ????????? ?? Systemd: ??? ???????

??????: ??? ?????

???????: 7 ???? 2016

Systemd ?? ???? ???? ?????? ?????? ???? ???????. ????? ??????? ???? ??????? ??????? ????? ?????????.

???? ??? ??????? ??????????? ???????? ??? ????? ??? ?????. ????? ????? ??????? ???????? ??? ??????? ??????? ????? ????? ????????? ?? ???????? ???????. img

?????? ??????

?? ???????? ????? ????? ????? ?? ??????? init ?????.

?????? ??????? ????? ???? ??????.

??? ??????? ??? ?????.

?????? ??? ??????? ????. init ???? ???????? ???? ??????? ??? ?? ???? ??????? ??????? ??? ??? ???????? ?? ??????? ???????.

??????? ??? ????? ???????? ????? ????. init ??????? ???? ??? ?????? ????? ???????? ??? ???????? ??? ???? ????. ????? ??????? ??? ?????? ????? ??????? ?????? ??? ???? ??????? ?????? ??????.

??????? ???? ???? ??? Systemd

?? ????? Systemd ??? ??? ????????. ??? ?????? ?? ????? ?????? ????? ?? ?????? ???? ?????? ???????.

????? ?????? ?????? ?????? d ?? ?????? ?????? ??????? (daemon). ???? ??? Systemd ?? ??? ???? ??? ????? ?????? ??????.

img

( ?????? ????? ????? Systemd ) Lennart Poettering

??????? Systemd ???? ??? ?? ??? ???? ???? ???????? init ?? ??????? Systemd ?? initd ? ????? ??? ????? ?? ?????? (????? ??????? ????? 1)? ????? ???? ???????? ?????? ?????? ????? ??.

????? ????? ???? ????? Systemd.

Systemd 的優(yōu)點(diǎn)是功能強大,使用方便,缺點(diǎn)是體系龐大,非常復雜。事實(shí)上,現在還有很多人反對使用 Systemd,理由就是它過(guò)于復雜,與操作系統的其他部分強耦合,違反"keep simple, keep stupid"的 ????? ????? img

(?????? ????? ?? ???? ???? Systemd)

??????? ????? ??????

Systemd ??? ????? ??????? ?? ?? ?????? ?? ??????? ???? ????? ????? ????? ????? ??????.

3.1 systemctl

systemctl ?? ????? ??????? ?? Systemd? ????? ??????? ?????? ??????.

3.2 systemd-analyze

systemd-analyze ????? ???????? ???? ??? ??? ???????.

3.3 hostnamectl

hostnamectl ????? ??????? ???? ??????? ?????? ??????.

3.4 localectl

localectl ????? ???????? ???? ??????? ???????.

3.5 timedatectl

timedatectl ????? ???????? ???? ??????? ??????? ??????? ???????.

3.6 loginctl

loginctl ????? ??????? ???? ?????????? ???????? ???????? ??????.

????

4.1 ??????

???? ?? Systemd ????? ???? ????? ??????. ????? ??????? ???????? ???? ???? (Unit).

?????? ????? ??? 12 ?????.

  • ???? ??????: ????? ??????
  • ???? ?????: ?????? ????? ?? ??? ?????
  • ???? ??????: ??????? ??????
  • ???? ?????: ???? ????? ???? ???????
  • ???? ??????? ????????
  • ???? ??????: ??? ?? ????
  • ???? ??????: ????? ?????? ???? ?????? ?????? Systemd
  • ???? ???????: ?????? ????????
  • ???? ??????: ???? Systemd? ???? ??????? ??? ???? ?????.
  • ???? ??????: ???? ??????? ??? ????????
  • ???? ???????: ??? ???????
  • ???? ??????: ????

systemctl list-units ????? ??????? ????? ???? ???? ??????? ??????? ?? ??????.

4.2 ???? ??????

systemctl status ????? ?????? ???? ???? ?????? ????? ???? ?????.

???????? status ???? systemctl ??? ?? ????? ???? ??? ????? ?????? ?? ??????? ????? ?????? ???? ????? ?? ??? ?????? ???? ???????.

4.3 ????? ??????

??????? ??????????? ??????? ?????? ????????? ?? ??? ?????? ????? ??????? ???? ?????? ??????? (???? ???? ???? ????? ??? ??????).

4.4 ???????? ??????????

???? ????? ?????? ??? ???????: ?????? A ??? B ???? ?? Systemd ??? ??? ????? A ????? ????? ????? B.

systemctl list-dependencies ?? ?????? ???? ???????? ????? ?????.

?? ???? ????? ?????? ???? ??? ???????? ?? ??? Target (???? ?????)? ????? ?? ??? ????? ???? ???????. ??? ??? ???? ?? ????? Target? ?????? ??? ??????? --all ???????.

????? ??? ????? ??????

5.1 ???? ????

?? ???? ????? ??? ??? ?????? ???? Systemd ????? ??? ????? ??? ??????.

??????d ????????? ?? ?????? /etc/systemd/system/ ????? ??? ?????????. ??? ???? ??? ???? ??????? ???????? ??? ?? ????? ????? ???? ??? ???????. /usr/lib/systemd/system/ ??? ??????? ??????? ???? ?? ?? ????.

systemctl enable ??? ??????? ????? ?????? ????? ?????? ???? ??? ???????? ????????? ?????.

??? ?? ????? ??? ??????? ?? ??? ???????? systemctl enable ????? ????? ????? ??? ???????.

????? ???? systemctl disable ????? ?????? ?????? ??????? ??? ?????????? ??? ????? ????? ??? ???????.

?????? ??? ??????? ?? ??? ??????? ??? sshd.socket ??? ?? ?????? ??? ???? Systemd ????????? ?? .service ??? sshd ???? ???? ??? ??? sshd.service 。

5.2 ???? ??? ???????

systemctl list-unit-files ????? ???????? ???? ???? ????? ???????.

????? ??? ????? ?????? ?????.

???? ??? ??????? ???? ?? ??? ?????? ????? ????? ?????.

  • ????: ?? ????? ???? ??? ???????
  • ????: ?? ??? ????? ???? ??? ???????
  • ????: ?? ???? ??? ????? ???????? [Install] ??? (?? ???? ??????) ? ???? ???????? ??? ??????? ?????? ??????? ??????.
  • ?? ??? ????? ????? ??? ??????? ???? ????? ????????.

???? ?????? ??? ?? ???? ????? ?? ??? ???? ?????? ???? ?? ???? ??? ???????. ??? ????? ?? ?? ???? ??????. systemctl status ???.

????? ????? ??? ???????? ??? ???? ????? ????? ??? ??????? ?? SystemD ?? ????? ???????? ???? ??? ????? ?????????.

5.3 ????? ??? ???????

??? ??????? ?? ???? ??? ??? ????? ???? ???? ???????? ???? ????.

systemctl cat ????? ??????? ????? ???? ????? ??? ???????.

?????? ?? ??? ?? ???????? ????? ?? ??? ??????? ???? ??? ??? ???. ????? ????? ?? ?? ???? ?? ??? ???? ??? ?????? ?????? ?????? ??? [Unit] ???? ?????? ?? ????? ??? ????? ??? ??????? ????? ????? ??????.

?? ???? ????? ??? ?????? ?? ????? ????? ????????? ???????? ?????? ?????? ????????.

5.4 ??? ??? ???????

[Unit] ?????? ???? ?? ???? ?????? ?????? ?? ??? ???????? ??????? ?????? ?????? ??????? ????? (Unit)? ???????? ??? ????? ??????? ?? ????? ????. ?????? ???????? ??? ??? ???.

  • Dsecription ??? ????
  • Documentation ????? ???????
  • Requires ??? ???? ??????? ?????? ???? ????? ????? ?????? ??????? ??? ??? ???????? ?????? ??? ?????? ???????.
  • Wants ??? ???? ??????? ?????? ???????? ??????? ??????? ??? ??? ???????? ??? ???? ?????? ??????? ?? ???????.
  • BindsTo ? Requires ??? ???? ???? ??? ???? ?????? ???????? ??????? ??? ?? ???? ?????? ??????? ?? ???????.
  • Before ??? ??? ??? ??? ?????? ??????? ?? ??? ?????? ???? ?? ???? ??? ?????? ???????.
  • After ??? ???? ?????? ??????? ?? ??? ????? ????? ????? ??? ???????? ???? ??????? ??? ?????? ???????.
  • Conflicts ?????? ??????? ??? ?? ???? ??????? ?? ?????? ??????? ?? ??? ?????.
  • Condition... : ??? ????? ?????? ???? ??? ?? ?????? ?????? ???????? ???? ??? ????.
  • Assert... : ??? ?? ?????? ???? ??????? ??????? ?????? ????????? ???? ????? ????? ??? ?? ???????.

[Install] ????? ?? ???? ?????? ??????? ?? ??? ???????? ??????? ?????? ????? ??????? ??? ??? ??? ??? ??? ??????? ??? ????? ??????. ?????? ???????? ??? ???????.

  • WantedBy ????? ?? ??? ???? ?? ????? ?????? ???? ?????? ??????? ?????? ???? ??? ???????? ??????. /etc/systemd/system ??? ?????? ???????? ??? ????? + .wants ?? ?????? ?????? ?????? ?? ????????
  • RequiredBy ????? ?? ??? ???? ?? ????? ?????? ??? ????? ?????? ???????? ???? ????? ?????? ??????. /etc/systemd/system ??? ?????? ???????? ??? ????? + .required ?? ?????? ?????? ?????? ?? ????????
  • Alias : ??????? ????????? ??????? ?????? ?????? ???????
  • Also ??? ????? ?????? ??????? (???????)? ???? ????? ????? ???? ?? ??? ?????.

[Service] ??? ??????? ?????? ?????? ??????? ??? ????? ?? ??? ?????? ????? ??? ??????. ?????? ???????? ??? ??? ???.

  • Type : ????? ???? ??????? ??? ??? ???????. ????? ????? ???????.
  • Type=simple ?????? ??????????? ??????? ExecStart ????? ??????? ??? ??????? ????????
  • Type=forking : ????? ????? ????? ?? ??????? ???? ?????? fork? ???? ??????? ????? ??????? ???? ??? ?????.
  • Type=oneshot ????? ?????? ?????? Systemd ??? ???? ?????? ??????? ??? ?? ????? ?? ???????.
  • Type=dbus : ?????? ??????? ???? ??? D-Bus
  • Type=notify : ?? ????? ?????? ???????? ????? ???????. Systemd ???? ???????.
  • Type=idle ??? ???? ???? ???? ???? ?? ??????? ?????? ?????? ??????? ???.
  • ExecStart : ??? ????? ?????? ???????
  • ExecStartPre ??????? ???? ??? ??????? ??? ??? ?????? ???????
  • ExecStartPost ????? ???? ??? ?????? ??? ??? ?????? ???????
  • ExecReload : ????? ???? ??? ?????? ??? ????? ????? ?????? ???????
  • ExecStop ??? ??? ?????? ??? ????? ?????? ???????
  • ExecStopPost ????? ????? ???? ??? ?????? ??? ???? ??????
  • RestartSec : ??? ??????? ??? ????? ????? ?????? ???????
  • Restart ????? ??????? ???? ????? ???? Systemd ?????? ????? ?????? ???????? ?????? ???????? ???? always (?????? ????? ???????) on-success 、 on-failure 、 on-abnormal 、 on-abort 、 on-watchdog
  • TimeoutSec ????? ??? ??????? ???? ??????? Systemd ??? ????? ?????? ???????
  • Environment ????? ????? ??????

???? ?????? ??? ??????? ??????? ????? ??? ????? ??????. ??????? ???????

?????

??? ????? ?????????? ????? ??? ????? ??? ???? ?? ???????. ??? ??? ?? ??????? ????? ?? ???? ????? ??? ??????? ?? ?? ???? ??? ?????? ?? ??? ????? ??? ???? ??????. ???? ???? ????? Systemd ?? ????? (Target).

簡(jiǎn)單說(shuō),Target 就是一個(gè) Unit 組,包含許多相關(guān)的 Unit 。啟動(dòng)某個(gè) Target 的時(shí)候,Systemd 就會(huì )啟動(dòng)里面所有的 Unit。從這個(gè)意義上說(shuō),Target這個(gè)概念類(lèi)似于"狀態(tài)點(diǎn)",啟動(dòng)某個(gè) Target 就好比啟動(dòng)到某種狀態(tài)。

?????? init ?? ??? ???????? ???? ????? RunLevel? ????? ???? ????? Target. ????????? ?? ?? RunLevel ???????? ??? ???? ????? ??? RunLevel ?? ??? ?????? ????? ???? ????? ??? Target ?? ??? ?????.

?????? Target ?? ????? ??????? ???????? ??? ???.

??? ?? init ?????????? ???????? ??? ???????? ???????.

(1) ????? ??????? ????????? (?? /etc/inittab ?? ??????? ??????? ?????) ???? ?? Target ?????????? ?????? ?? /etc/systemd/system/default.target ????? ?? ????? ?????? ???? graphical.target ????? ?????? ?? multi-user.target (??? ??????? ??????? ??????????).

(2) ???? ????? ??????? ??? ?????? /etc/init.d ??????? ????? ????? ??? ???? RunLevel ?????? (??? /etc/rc3.d 、 /etc/rc5.d ???? ??? ?????? ?? /lib/systemd/system ? /etc/systemd/system ????.

(3) ???? ??? ??????? ?????? init ??? ????? ??????? ?? /etc/inittab ??????? ????? ????? ??????? ???????? ?? /etc/sysconfig ??????. ??? ????? ????? ??????? ??????? ???? ????? ?? /lib/systemd ??????? ?? /etc/systemd ???? ?? ?????? ????????? ?? ?????? ????????? ???????.

?. ????? ???????

???? Systemd ??? ????? ???? ????? ??? ??????? ?????? ?????? ???? ????. ??????? ?? ??? ?? ??? ????? ??? ??????? journalctl ??? ???? ???? ??????? (????? ?????? ?????? ?????????). ??? ????? ??????? ?? /etc/systemd/journald.conf 。

journalctl ????? ????? ?????????? ????? ????.

(???????)

??????? ???????

??? ??????? ??????:

??? ????? ?????? QQ
欧美AV无码一区二区,麻豆+无码+国产在线+观看,欧美狂躁少妇XXXX高潮无码,美女扒开屁股让男人桶免费观看,极品粉嫩国产18尤物在线播放