Skip to content

Instantly share code, notes, and snippets.

@Nazar32
Last active January 9, 2019 14:14
Show Gist options
  • Select an option

  • Save Nazar32/6f112d31275df42f2e22cf110b5dea50 to your computer and use it in GitHub Desktop.

Select an option

Save Nazar32/6f112d31275df42f2e22cf110b5dea50 to your computer and use it in GitHub Desktop.
  1. Install php 7.0
curl -s http://php-osx.liip.ch/install.sh | bash -s 7.0
  1. Add php bins to .bash_profile
echo 'export PATH=/usr/local/php5/bin:/usr/local/php5/sbin:$PATH' >>~/.bash_profile
  1. 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
  1. Change user directive in www.conf file
user = your_user
  1. If 9000 port is busy, change port in listen directive, for example
listen = 127.0.0.1:8999
  1. Start php-fpm
sudo php-fpm
  1. 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment