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.



