nginx 和 php 启动文件
php vim /usr/lib/systemd/system/nginx.service
[Unit]
Description=nginx service
After=network.target
[Service]
Type=forking
ExecStart=/bin/nginx
ExecReload=/bin/nginx -s reload
ExecStop=/bin/nginx -s quit
PrivateTmp=true
[Install]
WantedBy=multi-user.target
nginx vim /usr/lib/systemd/system/php-fpm.service
[Unit]
Description=The PHP FastCGI Process Manager
After=syslog.target network.target
[Service]
Type=simple
PIDFile=/opt/app/php/php-fpm.pid
EnvironmentFile=php-fpm
ExecStart=php-fpm --nodaemonize --fpm-config /opt/app/php/etc/php-fpm.conf
ExecStop=/bin/pkill php-fpm
ExecReload=/bin/kill -USR2 $MAINPID
PrivateTmp=true
[Install]
WantedBy=multi-user.target
本文来自博客园,作者:六月OvO,转载请注明原文链接:https://www.cnblogs.com/chenlifan/p/18946358