- Install php 7.0
curl -s http://php-osx.liip.ch/install.sh | bash -s 7.0
- Add php bins to .bash_profile
echo 'export PATH=/usr/local/php5/bin:/usr/local/php5/sbin:$PATH' >>~/.bash_profile
- Create config files for php-fpm
sudo cp /usr/local/php5/etc/php-fpm.conf.default /usr/local/php5/etc/php-fpm.conf
sudo cp /usr/local/php5/etc/php-fpm.d/www.conf.default /usr/local/php5/etc/php-fpm.d/www.conf
- Change user directive in www.conf file
user = your_user
- If 9000 port is busy, change port in listen directive, for example
listen = 127.0.0.1:8999
- Start php-fpm
sudo php-fpm
- Enable autostart php-fpm and nginx
sudo cp /usr/local/opt/php/homebrew.mxcl.php.plist /Library/LaunchDaemons
sudo cp /usr/local/opt/nginx/*.plist /Library/LaunchDaemons