It is a simple script to install a environment with Apache,Mysql and PHP with Brew in a fast way.
Based on this awesome post Alan Ivey
- Apache 2.2 with openssl and PHP-FPM (faster and easier to change php version)
- Php 5.6 with php56-opcache
- Mysql (Last version)
- ~/Sites (Auto vhost, any folder in this directory is transformed into a virtualhost with the extension .dev without need to restart the server)
- To change php version:
brew services stop php56 && brew unlink php56 && brew link php54 && brew services start php54
You can grab the script here (Option-click to download.)
You'll need to chmod a+x bamp.sh
in order to run it after downloading.
./bamp.sh install
./bamp.sh uninstall
With this command we will be able to know if the vhost machines work.
ping -c 3 fakedomainthatisntreal.dev
NOTE For the first time after the installation if it does not work, you should disconnect the wifi or network cable and connect it again
httpd -DFOREGROUND
PHP-FPM: $(brew --prefix)/var/log/php-fpm.log
MySQL: $(brew --prefix)/var/mysql/$(hostname).err
This script has been tested on the following versions OSX
- 10.11.4 (OSX El Capitan) | MacBook Pro (2015)