Install Apache, MySQL, PHP on Mac OS 10.11

First thing brew!

Install homebrew http://brew.sh

Setup virtual hosts

sudo nano /etc/apache2/httpd.conf

Uncomment this lines.

https://gist.github.com/LehaMotovilov/24d64a657477011e04b8

Add new virtual host.

sudo nano /etc/apache2/extra/httpd-vhosts.conf

https://gist.github.com/LehaMotovilov/d85408f8a50a66fa4ac4

Add new virtual host to OS.

sudo nano /etc/hosts
127.0.0.1 wordpress.dev www.wordpress.dev

Install PHP

We must install new php via homebrew.

brew install php56 php56-imagick php56-mcrypt

After install we must load new php version.

sudo nano /etc/apache2/httpd.conf

Find this:

LoadModule php5_module libexec/apache2/libphp5.so

And replace:

LoadModule php5_module /usr/local/Cellar/php56/5.6.17/libexec/apache2/libphp5.so

Install phpMyAdmin

brew install homebrew/php/phpmyadmin
sudo nano /etc/apache2/httpd.conf

Insert this code to end of config.

https://gist.github.com/LehaMotovilov/6ed48a598f828d12bd0b

Published by Aleksey Motovilov

Just do it!

Leave a comment

Your email address will not be published. Required fields are marked *