Installing PHP and MySQL (and Apache2) on OSX | September 5, 2003

A while ago I wanted to install PHP and MySQL on my Mac, so I could develop locally rather than have to use a remote web server. Now I know a bit of PHP, and MySQL but my UNIX knowledge pretty much sucks. I can do basic UNIX tasks, but anything even slightly more advanced sends me into unknown (and quite frankly scary) territory. As such I was keeping my fingers crossed that installing PHP and MySQL would involve little on no need to use the command line.

When I first wanted to install these apps, there was no info on the Apple site. However I did come across a couple of articles on the O'Reilly OS X Dev Site detailing how to install PHP and MySQL on OS X.

I gave it a stab but very quickly got lost. I was following all the UNIX commands step by step, but things just weren't working so I eventually gave up. A while later I found details on the apple developers site about installing PHP and MySQL. These Instructions were much simpler to follow, but still caused problems and again I gave up feeling rather stupid and dejected.

Then a few days ago I came across this site offering painless installs of Apache 2, PHP and MySQL. They were not wrong. The whole download and install process took less than half hour for all 3. What's more the Apache and MySQL installs came with preference panes allowing you to do a lot of tasks you'd normally have to do in the command line.

So a big thanks to Server Logistics for making these packages available for the UNIX'ly challenged.

Posted at September 5, 2003 8:21 PM

Comments

Michael Allan said on September 6, 2003 12:45 AM

Marc Liyanage has offered an equally excellent and similarly generous service to unix newbies (like myself) for quite some time now as well. Check out

http://www.entropy.ch/software/macosx/

All the installs I’ve tried have worked flawlessly.

Taylor said on September 6, 2003 7:55 AM

Hey Andy, I noticed on your comment over @ hicks design that you might add one of the uber trendy link sidebars to your blog. You should consider Linkpool ( http://shinyplasticbag.com/linkpool ) first. Its a global link sidebar that I had a hand in, and is quite easy to add to your site.

Love your content btw, and just became a daily reader via rss :)

Josh said on September 6, 2003 6:55 PM

Andy,

You didn’t happen to come across something similar for windows, did you? I’m want my own testing environment using Apache, PHP, and MySQL but haven’t come across anything to help me install and configure. I should note that i’m new to all three.

Keith said on September 6, 2003 7:33 PM

Andy - you’re the coolest, well you and Server Logisitics.

I’ve been going to do this for quite awhile and franky, being fairly new to OSX, Apache and the rest, it was a bit intimidating. I’ve been a Windows, IIS, SQL Server guy up until a year or so a go. This was very, very easy.

Now I just need to figure out how to get my site replicated on my machine. I have a feeling dumping my MovableType data might be a bit tricky.

Thanks again.

Dan R. said on September 7, 2003 2:04 AM

Great tip Andy, I’ll add Server Logistics to my list of important links :-)

Josh: Check out these links, they should be exactly what you need:

http://www.apache.org/dist/httpd/binaries/win32/
http://php.weblogs.com/easywindows
http://www.mysql.com/downloads/index.html

If you are OK with using Apache 1.x, there is an all-in-one installer which also includes some graphical front-ends: http://www.datacaptech.com/winlamp.php

Keith: Just export all your MT data, and as long as you just recreate your directory structure exactly oh your local development machine (including all MT templates) and use the same settings for the MT install, you can just import your data and that’s it (make sure you name the MySQL db the same, just in case).

Dan R. said on September 7, 2003 2:05 AM

Oh, you may want to add a note near the comments form that HTML will be stripped :-)

Rob Winters said on September 8, 2003 7:51 AM

Do you need the dev tools CD for this? I didn’t seem to get one with my shinny new G4 12 incher.

Pete Barr-watson said on September 8, 2003 8:50 AM

I agree with Michael at the top - Marc Liyanage’s site —> http://www.entropy.ch/software/macosx/ —> is brilliant for MySQL and PHP installers on OSX. Every mac machine I run (5 in total) has used this site and it’s installers for setting everything up.

You don’t need the developers tools Rob, it’s mostly already built into OSX actually, but just needs ‘switching’ on. The above link will install the latest versions as well though.

Rob Winters said on September 8, 2003 9:40 AM

Thanks Andy, just followed those links and now have me a nifty li’l development environment.

Thanks :)

Andy Budd said on September 8, 2003 8:25 PM

Glad you all found the post useful. I came across the Marc Liyanage site quite a while ago and agree that his packages are also really useful.

However they still require you to do some stuff in the Terminal whereas the packages from Server Logistics really are idiot proof (something I very much appreciate).