Nginx, PHP54 e MySQL são instalados no Mac

php54, mysql, nginx instalar no Mac por homebrew

preparar

  • homebrew instalado

instalar script

sudo brew update
https
://gist.github.com/mystix/3041577

Configuração

redefinir conta de root mysql

/usr/local/opt/mysql/bin/mysqladmin -u root password 'new-password'
mysql
-u root -p

configuração de html / php

/usr/local/var/www

nginx

/usr/local/etc/nginx/nginx.conf

editar configuração nginx, remover comentários




location ~ .php$ {
root html;
fastcgipass 127.0.0.1:9000;
fastcgiindex index.php;
include fastcgiparams;
fastcgiparam SCRIPTFILENAME /usr/local/var/www/$fastcgiscript_name;
}
</code>
</pre>

then reload nginx,

sudo nginx -s reload


or stop nginx and start it.

sudo nginx -s stop
sudo nginx


mysql, fpm, fastcgi, apc already install and run with it

try

add a php file in html path. save as info.php

<?php
phpinfo();
?>


show result in browser,

http://localhost/info.php