Skip to content

Instantly share code, notes, and snippets.

@zhouyl
Last active March 22, 2017 02:02
Show Gist options
  • Select an option

  • Save zhouyl/85e18a62b128fe3cb94157ed951c6623 to your computer and use it in GitHub Desktop.

Select an option

Save zhouyl/85e18a62b128fe3cb94157ed951c6623 to your computer and use it in GitHub Desktop.
自己编写 systemd 下的 fpm.service

编辑完成 /etc/systemd/system/php7.1-fpm.service 运行

sudo systemctl daemon-reload
[global]
pid = /run/php7.1-fpm.pid
error_log = /var/log/php7.1-fpm.log
[Unit]
Description=PHP7.1-FPM
After=network.target syslog.target
[Service]
ExecStart=/usr/local/php7.1/sbin/php-fpm --fpm-config /usr/local/php7.1/etc/php-fpm.conf --daemonize
ExecStop=/bin/kill -INT $MAINPID
ExecReload=/bin/kill -USR2 $MAINPID
Type=forking
[Install]
WantedBy=default.target
Alias=php7.1-fpm.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment