After debating for a while on wither I should actually setup a “LAMP” stack on my laptop to dev work, I decided to just do it. Most of the IDEs I looked at and the one I decided on, Aptana, do not really support complex PHP/SQL apps. So, lets do this.
I’ve already been using Home Brew to manage some custom packages, so lets stick with that for our “LAMP” stack.
- Lets start with the base, a SQL server. I like to play around with new things and don’t need the heft of MySQL or Percona so I’m going to MariaDB.
brew install mariadb brew services start mariadb mysql -u root
- Ok, lets now go with the frontend. I’ve been favoring Nginx a lot lately. It is lightweight, can support lots of nifty things like HTTP/2 and once you have the config tuned, it pretty much stays the same.
brew install nginx brew services start nginx Vhost config dir: /usr/local/etc/nginx/servers/
- Now for something a bit more complex, installing php7.x with FPM support. We do want to install PHP7 with lots of goodies.
brew install --without-apache --with-fpm --with-mysql --with-mcrypt --with-opcache --with-imagick --with-intl --with-redis --with-xdebug --with-tidy php70 brew services start homebrew/php/php70 Pool location: /usr/local/etc/php/7.0/php-fpm.d/*.conf
Tomorrow, I’ll cover setting up the actually config dirs and importing existing DBs.