Posts Tagged ‘mamp’

Have a Mac? You Have a Web Server! part 1: Installing Your Server

Monday, March 15th, 2010

This is a 3 part series on setting up a webserver on you Mac- it's my first how-to, so give some feedback, please!

Nowadays, it's incredibly simple to setup a home web server. I've been a Web Designer since 1998 and a Mac user for far longer than that. When I started building websites, serving sites from a Mac was impractical. There was no inexpensive solution- Webstar was the only robust server for the Mac and it started at $500. Along came Mac OSX, and with it, the Unix underpinnings it was built upon. SWEET! the Mac Desktop was now a LAMP platform (Linux-Apache-Mysql- Php), a robust, enterprise-class web server...almost. It wasn't very easy compiling PHP and Apple's installs of Apache and PHP were minimalist...

I'm getting too geeky-speaky, aren't I? Let's get to the meat!

How to setup a robust PHP/MySQL server on your Mac:

Download and install MAMP (Mac-Apache-MySQL-PHP)

The easiest solution I've seen to date is the MAMP Server. It's easy to install, incredibly rock-solid, and FREE (though you can spend $70 to upgrade to the pro version- and I did :)! "MAMP" is a play on "LAMP", which I mentioned earlier.

  1. Download that Beotch!
    Download the MAMP server [here].
  2. Install that Beotch!
    Double-click on the downloaded file and a disk will appear on you desktop.
    Drag the folders to your Applications Folder as they tell you to do.
  3. Run that Beotch!
    Go to your Applications folder, open the MAMP (not MAMP Pro) folder and double-click on the MAMP icon.

Once you startup MAMP, the Apache (and PHP) and MySQL Servers will startup and, BOOM!, you're a web server!

Open a browser, type in http://localhost:8888/MAMP/?language=English and you'll see startup page with links to your PHP information page, MySQL Database admin tool (PHPmyAdmin) and FAQ page.

If you notice the ":8888" after "http://localhost", that's a "port number"- you'll want to change that in the MAMP preferences to "80". That way, people won't have to type ":8888" after your web address to see your website.

The default location for your website files are in the MAMP application folder in the "htdocs" folder- you can change the location to somewhere "less obscure" (like your home folder's "Sites" folder) in the MAMP preferences under "Apache".

Setting up a PHP/MySQL site is beyond the scope of this article, but I recommend this book for beginners :)

Next segment- Connecting your computer to the outside world!