Setting up Mac OS X Snow Leopard for local dev

Setup Mac OS X as a serverIt’s no secret that I recently upgraded my Mac Pro to run the latest version of Mac OS X Snow Leopard. It’s probably no secret to most people that I also develop code for various different websites and projects. That being said it just makes life easier to have Zeus (all my systems are named after Greek mythology Gods/Goddesses/Heroes) run the languages I use locally. Not only do I use standard HTML & CSS but I rely heavily upon PHP & MySQL. These were running flawlessly on my 10.4 installation and have been on my iBook (Apollo) for years. I recall last time that I had to compile PHP & MySQL to work on OS X properly but somewhere along the way stumbled upon an article highlighting that Mac OS X comes pre-compiled with both languages, along with an install of Apache.

So I hit Google and came across a great article that highlighted the high-level things about tweaking settings when upgrading to Mac OS X. This was great. It allowed me to get MySQL & PHP up and running quickly. There were a few things missing like session support. Some more searching yielded another resource on how to enable session support in PHP. Combining my knowledge of code development, the first article I found and the correct variables to adjust it was a quick edit.

I will say I did this all in Terminal on my Mac. The thing you must know is that you have to run pico (built in text editor) in admin mode. It’s really easy to be honest. Simply enter sudo pico xxxxxx (where xxxxxx is the filename you wish to edit) and enter your administrator password when asked. Refresh your page to see if it worked. If not, you may have to restart Apache and try again.

It might sound complicated and daunting, but it is quite simple. Now unfortunately there are a few things that still don’t seem to be working correctly and some additional libraries need to be compiled as well. Hopefully I can get away without doing too much to get things working properly. I’ll be sure to let you know what I come across.

Do you have any other suggestions or resources on setting up Mac OS X as local development server? Let me know in the comments.

This entry was posted on Tuesday, January 5th, 2010 at 10:42 pm and is filed under Code Development. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply