1, installation homebrew
Ruby-e "$ (curl-fssl https://raw.github.com/mxcl/homebrew/go/install)"
2, Installation Homebrew-cask
Brew tap Phinze/homebrew-cask && Brew Install Brew-cask
3. Install Oh-my-zsh & Iterm2 & Lanch rocket
4. Install Common development components
Brew install wget watch Tmux cmake OpenSSL imagemagick graphicsmagick readline autoconf multitail source-highlight Autojum P Zsh-completions composer
5. Pre-installed PHP
Brew tap Homebrew/dupes && Brew tap homebrew/versions && Brew Tap homebrew/homebrew-php
6. Install PHP
Brew Options php56 && Brew Install php56
7, install common PHP expansion pack
Brew Install Php56-xdebug php56-mcrypt Php56-redis Php56-mongo Php56-imagick
8. Open the system's own Apache and enable the freshly brew-installed PHP
sudo vi/private/etc/apache2/httpd.conf
9, find "#LoadModule php5_module libexec/apache2/libphp5.so" line, insert a row below
LoadModule php5_module/usr/local/cellar/php56/5.6.5/libexec/apache2/libphp5.so
10. Restart the system with Apache
sudo apachectl restart
You can then add a index.php to the Apache Wwwroot (which is probably the/library/webserver/documents directory) and output a phpinfo () look.
If you need to install MySQL, you can turn off the current terminal, and then open the ITerm2 you just installed, enter the following command:
Brew Install MySQL
After the installation is complete, enter the following command:
Mysql_secure_installation
After the carriage return, follow the prompts to configure the basic security options for MySQL in one step.
All reboots, set to boot can use the launch rocket installed above, the effect is as shown:
Yosemite Rapid construction of PHP5.6 development environment