linux:commands:service

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
linux:commands:service [2016/01/04 18:34] ともやんlinux:commands:service [2023/04/29 08:37] (現在) ともやん
行 2: 行 2:
  
 ===== サービス起動 ===== ===== サービス起動 =====
-Fedora & CentOS 7+Fedora
 <code> <code>
 $ sudo systemctl start httpd.service $ sudo systemctl start httpd.service
 +</code>
 +<code>
 +$ sudo systemctl start {httpd,php-fpm}
 </code> </code>
  
行 13: 行 16:
  
 ===== サービス停止 ===== ===== サービス停止 =====
-Fedora & CentOS 7+Fedora
 <code> <code>
 $ sudo systemctl stop httpd.service $ sudo systemctl stop httpd.service
 +</code>
 +<code>
 +$ sudo systemctl stop {httpd,php-fpm}
 </code> </code>
  
行 24: 行 30:
  
 ===== サービス再起動 ===== ===== サービス再起動 =====
-Fedora & CentOS 7+Fedora
 <code> <code>
 $ sudo systemctl restart httpd.service $ sudo systemctl restart httpd.service
 +</code>
 +<code>
 +$ sudo systemctl restart {httpd,php-fpm}
 </code> </code>
  
行 35: 行 44:
  
 ===== サービス設定反映 ===== ===== サービス設定反映 =====
-Fedora & CentOS 7+Fedora
 <code> <code>
 $ sudo systemctl reload httpd.service $ sudo systemctl reload httpd.service
行 47: 行 56:
  
 ===== サービス自動起動設定 ===== ===== サービス自動起動設定 =====
-Fedora & CentOS 7+Fedora
 <code> <code>
 $ sudo systemctl enable httpd.service $ sudo systemctl enable httpd.service
 +</code>
 +<code>
 +$ sudo systemctl enable --now httpd
 </code> </code>
  
行 58: 行 70:
  
 ===== サービス自動起動無効設定 ===== ===== サービス自動起動無効設定 =====
-Fedora & CentOS 7+Fedora
 <code> <code>
 $ sudo systemctl disable httpd.service $ sudo systemctl disable httpd.service
行 66: 行 78:
 <code> <code>
 $ sudo chkconfig httpd off $ sudo chkconfig httpd off
 +</code>
 +
 +===== サービス状態表示 =====
 +Fedora
 +<code>
 +$ systemctl status acpid
 +</code>
 +<code>
 +$ systemctl status {httpd,php-fpm}
 </code> </code>
  
 ===== サービス一覧表示 ===== ===== サービス一覧表示 =====
-Fedora & CentOS 7+Fedora
 <code> <code>
 $ systemctl -t service --all $ systemctl -t service --all
行 86: 行 107:
 $ cat /usr/lib/systemd/system/named-chroot.service $ cat /usr/lib/systemd/system/named-chroot.service
 </code> </code>
 +
 +===== 参考文献 =====
 +[[https://community.nethserver.org/t/systemctl-and-vendor-preset-disabled/18355|Systemctl and "vendor preset: disabled" - Support - NethServer Community]]\\
 +[[https://www.freedesktop.org/software/systemd/man/systemd.preset.html|systemd.preset]]\\
 +
  • linux/commands/service.1451900051.txt.gz
  • 最終更新: 2019/05/18 02:23
  • (外部編集)