I often have to demonstrate Magento Enterprise to clients and potential clients when I go to visit them, and sometimes that’s difficult, because I can’t connect my laptop to the Internet very easily from their offices. It’d be easier from Starbucks, where I get free wi-fi, and generally the coffee’s better, but some clients don’t want to leave the office just for a demo. I’ve therefore figured out the steps involved in installing it locally, on my MacBook.
Install php and MySQL
OS X comes with Apache installed, but you’ll need to install php and MySQL before you can install Magento. I got mine from here and they work perfectly: just download the dmg files and run them. Note that the Entropy php isn’t yet compatible with Snow Leopard (OS X 10.6) and the MAMP server isn’t yet at php 5.2: a requirement for the standard Magento installation. For Snow Leopard systems, I’m looking at Zend Server Community Edition, and will update in the next few days.
Install phpMyAdmin
Once you have php, MySQL and Apache all set up, you can install phpMyAdmin by downloading it from here. Installing phpMyAdmin and getting that working proves:
- Apache is working and pointing to the right place
- php is working
- MySQL is working and accessible from Apache / php
Create a host file entry for your local Magento install
Magento hates working on localhost, and the easiest way to work around that is to edit your host file and add a fictitious domain, which will actually be served by your laptop.
Go to the command line and type in ‘sudo nano /etc/hosts’ then type in your password (assuming you’re an administrator on your laptop) and add a line like the following:
127.0.0.1 magento.enterprise.com
Save the file (Ctrl-O) and quit nano (Ctrl-K) and then check you can ping magento.enterprise.com. If you can, you’re ready to install Magento Enterprise. The first step is to install the sample data.
Install sample data
With Magento Enterprise 1.7 you can use the standard sample data that came with Magento Enterprise 1.2, available here. Download the zip file and unzip it, then go to phpMyAdmin, create a database (mine is called magentoenterprise) and import the SQL from the sample data file. It’s important you do this before you install the Magento application itself.
Install the application
I can’t link to a downloader for Magento Enterprise, but this is the point where you will unzip that, and copy it to a subdirectory of your sites folder. Mine is at ~/Sites/mage_ee which (if you’ve used magento.enterprise.com in your host file) will mean Magento is at http://magento.enterprise.com/username/mage_ee after you’ve copied it from the zip file.
You might need to set access on the files after you’ve unzipped them: to do this go to your site’s root directory (~/Sites/mage_ee in my case) and type in ‘sudo chmod -R -v 777 *’ and enter your password when prompted. This is poor security in the real world, but fine for a demo site on a laptop, especially one that’s using a fictitious domain name.
If you type in the URL in a regular browser, you should be taken to the install script, which (if you’ve followed all the steps above) should work perfectly first time.
Critical things to remember:
- The URL is the one you created in your hosts file
- The database name, login and password were all set up in phpMyAdmin
Once you’re finished with the installation, you can copy the images from the sample data zip file to the media folder in your Magento directory, and your sample store will then have all the pretty pictures as well.
I can add more detail in most places in this article, but for most people I hope the sequence of steps is the main thing. If you do this in the wrong order, you’ll have to start again, so follow the sequence carefully.

12 Comments
Checkout MAMP – http://www.mamp.info/en/index.html – for a free, simple and mac like (idiotproof) way to get Magento up and running in a jiffy. It includes Apache, PHP, MySQL and phpMyAdmin. As an alternative to phpMyAdmin I use Sequel Pro – http://www.sequelpro.com/ – it’s free too,
Nice Article. I’ve been documenting and providing screencasts of how to install Magento on my site, ScreencastWorld.com. Windows, Solaris, and Linux are easy because I just install these OS’s as a guest OS within Virtualbox and record away. I don’t have a Mac, nor do I have access to one. If you have no objections, I’d like to put a link to this article on my site for all those Mac Lovers out there.
MAMP is a streamlined way of setting up Apache/Mysql/PHP on OS X. http://www.mamp.info
Awesome! There have been lots of questions in the forums on this topic, and this will help immensely. I also put together a little tutorial on getting Zend Server CE going on OS X on my blog at http://clintberry.com – Thanks for you help!
Thanks for the great tutorial. We have been playing with trying to install and host a Magento store on Mac OS X server and will post our tutorials soon…
It is too bad that it is not always straight forward to install all the necessary server packages on Mac OS X and have to get these specially compiled ones from entropy.
Any how.. if you ever need theme or design help for your clients on Magento, feel free to give us a buzz!.
eCommerce-Themes.com
The Biggest Magento Theme Marketplace
Is your Mac running leopard or snow leopard? I used those PHP packages to successfully run Magento CE before I upgraded to snow leopard, but I don’t think they work anymore.
I’m on 10.5.8 on my Macbook, but I will test it soon on my Snow Leopard imac, so I’ll let you know.
Any particular reason that you decided to install everything separately instead of using MAMP?
I’ve always used Entropy’s packages, for the last 3 or 4 years, but MAMP does look interesting. Thanks for the tip.
Great tutorial, I think we have all been there with a dodgy wi-fi connection at a clients office, this will eliminate that alltogether, tip of my list of things to do tomorrow. I wil probably attempt to get magento running better with coda too, that would be ideal.
I would second the comment on using MAMP, great little bit of kit.
Lee
I will probably attempt to
I
I would only recommend what I described for demonstrations and r&d, so the mcrypt problem hasn’t come up for me, but thanks for the link.
Thanks for the tutorial. I think you forgot to mention mcrypt.so and the problems many users are facing with it. I wrote a tutorial about that at my blog and also referenced yours. http://meshfields.de/install-magento-on-unix/
3 Trackbacks/Pingbacks
[...] Hopwood has created a great post on installing Magento stand-alone on OS X. I know there has been several posts in the Magento forums with questions on this. Just remember if [...]
[...] Technical and Operations Director over at Magento Enterprise Partner Pod1 has put together this great tutorial on getting Magento up and running on Mac. Mark’s instructions focus on Magento [...]
[...] Direttore Tecnico e delle Operazioni presso l’Enterprise Partner Pod1 ha messo insieme questo grande tutorial su come installare e configurare Magento su Mac. Le istruzioni di Mark pongono l’attenzione [...]
Post a Comment