![]() |
![]() |
![]() |
![]() |
![]() |
Swiss Army Laptop – Setup I (MAMP)
I made the move from Windows to MacOS about a year ago, after spending a long time as a corporate IT puke. In the corporate world, I got paid to know how Windows worked, but a bit of tinkering with Linux (early Gentoo, Debian, RedHat, Ubuntu) let me in on just how useful a robust command line is. I would have made the switch to Linux and been happy, but for the fact that I do a significant amount of graphic/design work and I needed a couple Adobe products. Enter MacOS, the right blend of Linux and Adobe.
But because I’ve been working as the lead (only for the first year) technologist for a startup, I need a reasonable facsimille of my production server environment running on my laptop and desktop. The Mac is perfect for this, and with about 30 minutes setup time, I managed to get the MAMP (MacOS – Apache – MySQL – PHP) environment set up and running.
Installing Apache
This is not really necessary, since it’s installed already. There are a few configuration options that needed to be done, though. Edit /private/etc/apache2/httpd.conf, and find the lines below, remove the leading hash (#) and save the file.
#LoadModule php5_module      libexec/apache2/libphp5.so
#Include /private/etc/apache2/extra/httpd-vhosts.conf
Simply visiting System Preferences > Sharing, and enabling Web Server, and then pointing your browser at http://localhost/ or http://127.0.0.1/ will show you it’s working. Configure virtual hosts by editing /etc/apache2/extra/httpd-vhosts.conf, and your hosts configuration, /etc/hosts. A vhosts.conf entry should look like this.
<VirtualHost *>
DocumentRoot “/Library/WebServer/Documents”
ServerName localhost
</VirtualHost>
Installing PHP…




