檢查源
brew tap josegonzalez/php
brew tap homebrew/dupes
php
安裝 php7
brew install php70 --with-fpm, --with-enchant, --with-debug
安裝好以後最後一行會以下圖所示:
檢查安裝好沒有,能夠看下有沒有 /usr/local/opt/php@7.0
這個文件夾,有了就是安裝成功了。nginx
launchctl load -w /usr/local/opt/php70/homebrew.mxcl.php70.plist // 關閉 launchctl unload -w /usr/local/opt/php70/homebrew.mxcl.php70.plist
alias php@7.0.start=launchctl\ load\ -w\ /usr/local/opt/php@7.0/homebrew.mxcl.php@7.0.plist alias php@7.0.stop=launchctl\ unload\ -w\ /usr/local/opt/php@7.0/homebrew.mxcl.php@7.0.plist
location ~ \.php$ { fastcgi_intercept_errors on; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /Users/admin/dt-yunhou-com$fastcgi_script_name; include fastcgi_params; }