Forum recently to give a custom php, and I was supposed python control, so the machine would be no php runtime environment, began to toss, originally configured on centos nginx + php-fpm quite simple, direct way yum install on it , which under the mac to a little trouble, although there are php on macports, but the method hack If you install php-fpm if necessary, in order not to trouble climbing the text using homebrew see ways to use third-party formula can be installed, The following start.
If you have not used homebrew, so the venue Homebrew look at the site, installation is simple, because it is a pile of ruby script, so you type directly in the terminal:
ruby -e "$(curl -fsSLk https://gist.github.com/raw/323731/install_homebrew.rb)"
Since you are playing this, I assume you have installed xcode, 3 or 4 can be. The next step is to download the formula php,
- -The curl https://github.com/ampt/homebrew/raw/php/Library/Formula/php.rb
- mv php.rb `brew --prefix`/Library/Formula
If you want to see php installation options, you can use
- brew options php
Ah, can now be installed, I just need php and php-mysql, so:
- brew install php --with-mysql --with-fpm
So basically it.
Reproduced in: https: //www.cnblogs.com/Stephen/archive/2011/04/09/Mac_Snow_Leopard_Homebrew_Install_PHP.html