OS X 10.9 - Nginx, php commands
Installing PHP 5.5 (with FPM) on Mac OS X
Search for available PHP formulas (formula’s in homebrews are equivalent to packages in aptitude)
brew search phpIt will return long list of php 5.2, 5.3, 5.4, 5.5 packages. We need 5.5. Tap it using:
brew tap josegonzalez/php
brew tap homebrew/dupesIf you do not tap homebrew/dupes you will get Error: No available formula for zlib
Before we build PHP 5.5, you may like to exercise options using:
brew options php55We have built it using:
brew install php55 --with-fpm --with-imap --without-apache --with-mssql --with-pgsql --with-debugAdding PHP-FPM to startup routine
Please check exact plist filename in /usr/local/Cellar/php54/
cp /usr/local/Cellar/php55/5.5.5/homebrew-php.josegonzalez.php55.plist ~/Library/LaunchAgents/To Start PHP-FPM:
launchctl load -w ~/Library/LaunchAgents/homebrew-php.josegonzalez.php55.plistTo Stop PHP-FPM
launchctl unload -w ~/Library/LaunchAgents/homebrew-php.josegonzalez.php55.plistInstalling Nginx on Mac OS X
Run following command:
brew install nginxAdding Nginx to startup routine
Please check exact plist filename in /usr/local/Cellar/mysql/
cp /usr/local/Cellar/nginx/1.4.3/homebrew.mxcl.nginx.plist ~/Library/LaunchAgents/To Start
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.nginx.plistTo Stop
launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.nginx.plistChanges to Nginx Config (optional)
By default, Nginx setup expects you to define all virtual hosts in /usr/local/etc/nginx/nginx.conf
Edit default config file and following line to http{..} block
include sites-enabled/*.conf;
Next you can create sites-available and sites-enabled folder to manage virtual hosts config.