CentOS7 Systemdによるシステムサービス管理入門
CentOS7では、以下のコマンドを使ってシステムサービスを管理することができます:
- サービスを起動する。
sudo systemctl start <service_name>
- サービスを中止します。
sudo systemctl stop <service_name>
- サービスを再起動する。
sudo systemctl restart <service_name>
- サービスのステータスを確認する:
sudo systemctl status <service_name>
- 起動時に自動起動するように設定する:
sudo systemctl enable <service_name>
- 起動時の自動起動を禁止する。
sudo systemctl disable <service_name>
- すべての起動されているサービスを確認する:
systemctl list-units --type=service
- すべてのロードされたサービスを確認する:
systemctl list-unit-files --type=service
上記のコマンドを使用することで、CentOS7システムのさまざまなサービスを簡単に管理することができます。