2016年9月18日 星期日

Linux systemctl 指令用法

列出可管理的單元類型
# systemctl -t help
使用說明
# systemctl --help
列出所有已安裝的單元
# systemctl list-unit-files
列出已安裝「php*」開頭的單元
# systemctl list-unit-files php*
將 php-fpm.service 設為開機自動啟動
# systemctl enable php-fpm.service
將 php-fpm.service 設為開機不自動啟動
# systemctl disable php-fpm.service
查看 php-fpm.service 目前是否設為開機自動啟動
# systemctl is-enabled php-fpm.service
啟動 php-fpm.service
# systemctl active php-fpm.service
停止 php-fpm.service
# systemctl stop php-fpm.service
查看 php-fpm.service 目前是否為啟動
# systemctl is-active php-fpm.service
查看 php-fpm.service 狀態
# systemctl status php-fpm.service


沒有留言:

張貼留言