systemdを利用してサービス(daemon)の設定を行う

これまで、サービス(daemon)のON/OFFはchkconfigとかserviceコマンドで設定してきたけど、Fedora16からはsystemdで設定するように変更されてる。systemdでの設定方法は下記のとおり。

1. サービスの起動 (# service hoge on)

# systemctl start hoge

2. サービスの停止 (# service hoge off)

# systemctl stop hoge

3. サービスの自動起動 (# chkconfig hoge on)

# systemctl enable hoge

4. サービスの自動起動停止 (# chkconfig hoge off)

# systemctl disable hoge

ちなみに、systemdが管理しているサービス*1をすべて表示する場合、次のようにする。

# systemctl --all

(参考)
systemd & systemctl - とみぞーノート

*1:unitというらしい