Setting Up a Web Development Server on a Mac
I finally got around to getting a proper development server set up on my new MacBook Pro. As a web developer, it’s invaluable to have a local server to test projects before sending them out into the world.
During my time as an engineering manager, I made sure that we had a development, test and staging server set up as part of the QA process. Recreating these exacting conditions as an independent contractor can be challenging, but a local development server is a great place to start.
I’ve used a lot of different rigs in the past, usually involving one or more dual-boot Linux/Windows boxes. I’m now working primarily from my MacBook and enjoy the portability. Having a local server has several advantages, not the least of which is not having to ssh into another box. I also like being able to work offline; this allows me to truly work anywhere.
Now I can get that same LAMP goodness for my Mac without tedious installs of Apache, MySQL and PHP (which replaced Perl for me once blog software became the CMS of choice). Cue the MAMP!
MAMP is Mac, Apache, MySQL and PHP and it is glorious. One download, one install and it works. That’s it. If you can follow an install wizard, you can be up and running with the MAMP in a matter of seconds. There’s an easy control panel that indicates server status, so you always know what’s going on without opening up a terminal. I laid WordPress over it, and was testing a client’s new blog in just a few minutes.
Aren’t Apache and PHP already installed on OS X? Here’s what the MAMP FAQ says about it:
At the moment, when using OS X, only Apache 1.3.x with PHP 4.3.2 is pre-installed. PHP has to be activated by changing the configuration files. The Apache/PHP versions provided by Apple are not always up-to-date, and the Apache-PHP combination is quite slow. In addition, MySQL has to be installed manually.
With one click, and in just a few minutes MAMP will install Apache 2, current PHP 4, current PHP 5 and MySQL. Using the included eAccelerator, PHP-scripts are executed up to ten times faster compared to Apple’s pre-installed Apache/PHP. When you use the MAMP programme, you can easily start and stop the server. Thus, the server does not have to be running in the background all the time, wasting precious resources. To “uninstall” MAMP, you only have to delete the MAMP directory and everything returns to the original state (MAMP does not alter anything on the “normal” OS X).
If your development work involves more than Dreamweaver and Photoshop, I highly recommend checking out the MAMP.
Leave a Reply
You must be logged in to post a comment.