このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
centos:systemctl [2020/05/28 15:32] y2sunlight [systemctlのユースケース] |
centos:systemctl [2020/06/04 11:30] (現在) y2sunlight [systemctlのユースケース] |
||
---|---|---|---|
行 4: | 行 4: | ||
--- // | --- // | ||
- | [[centos: | + | [[centos: |
- | systemd は RHEL7CentOS7で使われているサービスを管理するデーモンです。'' | + | systemd は RHEL7/ |
また、systemctl に触れる機会は既存サービスのメンテナンスの時だけに限りません。自作のWebAPIを公開する時などもサービスを自作しなければならいので使っています。兎に角、CentOS7 になってから systemctl はよく使うようになりました。 | また、systemctl に触れる機会は既存サービスのメンテナンスの時だけに限りません。自作のWebAPIを公開する時などもサービスを自作しなければならいので使っています。兎に角、CentOS7 になってから systemctl はよく使うようになりました。 | ||
+ | 関連記事 | ||
+ | |||
+ | * [[centos: | ||
+ | * [[centos: | ||
+ | * systemctl --- サービスの操作 | ||
+ | * [[centos: | ||
+ | * [[centos: | ||
リンク | リンク | ||
* [[https:// | * [[https:// | ||
* [[https:// | * [[https:// | ||
- | * [[https:// | ||
---- | ---- | ||
行 32: | 行 38: | ||
===== systemctlのユースケース ===== | ===== systemctlのユースケース ===== | ||
- | {{fa> | + | === サービスの操作 === |
+ | |||
+ | 形式: '' | ||
+ | |||
+ | * COMMAND --- コマンド名(以下にケース毎に記載) | ||
+ | * UNIT--- ユニット名(以下の例では '' | ||
+ | |||
+ | {{fa> | ||
< | < | ||
- | systemctl | + | systemctl |
+ | systemctl is-enabled sshd # 有効化確認 | ||
</ | </ | ||
- | {{fa> | + | {{fa> |
< | < | ||
- | systemctl | + | systemctl |
+ | systemctl stop sshd # 終了 | ||
+ | systemctl restart sshd # | ||
</ | </ | ||
- | {{fa> | + | {{fa> |
< | < | ||
- | systemctl | + | systemctl |
- | systemctl | + | systemctl |
</ | </ | ||
- | {{fa> | + | === サービス一覧 === |
+ | |||
+ | {{fa> | ||
< | < | ||
- | systemctl | + | systemctl |
- | systemctl stop sshd.service | + | |
- | systemctl restart sshd.service | + | |
</ | </ | ||
- | {{fa> | + | {{fa> |
< | < | ||
- | systemctl | + | systemctl |
- | systemctl disable sshd.service | + | |
</ | </ | ||
+ | |||
+ | === その他 === | ||
+ | |||
+ | {{fa> | ||
+ | < | ||
+ | systemctl daemon-reload | ||
+ | </ | ||
+ | |||
\\ | \\ | ||