Deletions are marked like this. | Additions are marked like this. |
Line 32: | Line 32: |
== 現在のサービスの状態表示 == | === 現在のサービスの状態表示 === |
Line 38: | Line 38: |
== サービスの起動と停止 == | === サービスの起動と停止 === |
centos7
emacsでsystemctlコマンドを使用すると警告が出る
WARNING: terminal is not fully functional - (press RETURN)
この場合
export PAGER=/bin/cat
とする。
systemctlのまとめ
サービスの一覧と状態のリスト
systemctl list-unit-files -t service
enable: 自動起動、disable:起動不可、static:単体では自動起動できない。
自動起動の設定
- systemctl enable サービス名.service
- systemctl disable サービス名.service
現在のサービスの状態表示
systemctl status サービス名.service
サービスの起動と停止
- systemctl start dhcpd.service
- systemctl stop dhcpd.service