手動啟動
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