MAC 启动NGINX、PHP-FPM(手动+自动)

2020-04-07  本文已影响0人  不留余白

手动启动

php-fpm

sudo /usr/local/Cellar/php@7.1/7.1.27/sbin/php-fpm -R

杀死php-fpm进程

sudo pkill -INT -o php-fpm

nginx

sudo nginx -c /usr/local/etc/nginx/nginx.conf

开机自动启动

php-fpm

//拷贝homebrew安装的php开机启动文件
cp /usr/local/opt/php@7.1/homebrew.mxcl.php@7.1.plist  /Library/LaunchDaemons
//添加到开机启动项
sudo launchctl load -w /Library/LaunchDaemons/homebrew.mxcl.php@7.1.plist

nginx

//拷贝homebrew安装的php开机启动文件
sudo cp /usr/local/opt/nginx/homebrew.mxcl.nginx.plist  /Library/LaunchDaemons
//添加到开机启动项
sudo launchctl load -w /Library/LaunchDaemons/homebrew.mxcl.nginx.plist
上一篇 下一篇

猜你喜欢

热点阅读