centos 7 php-fpmサービスの構成

839 ワード

プロファイルを追加し、自分がインストールしたphp-fpmパスに基づいてvim/usr/lib/systemd/systemm/php-fpmを変更します.service
[Unit]
Description=The PHP FastCGI Process Manager
After=syslog.target network.target

[Service]
Type=simple
PIDFILE=/usr/local/php/var/run/php-fpm.pid
ExecStart=/etc/init.d/php-fpm start  --nodaemonize --fpm-config /usr/local/php/etc/php-fpm.conf
ExecRestart=/bin/kill -USR2 $PIDFILE
ExecStop=/bin/kill -SIGINT $PIDFILE

[Install]
WantedBy=multi-user.target

電源投入開始を増やす
systemctl enable php-fpm.service

アクションコマンド
#   
systemctl start php-fpm.service 
#   
systemctl stop php-fpm.service 
#   
systemctl restart php-fpm.service