Magento Install, Mac OS X 10.6.4

A how-to after my own long, somewhat rocky installation. The first steps are just preliminaries, a few of which I already had set-up, but that may be useful.

  1. Set up computer to be a server, and ensure that all necessary extensions are enabled and config files are set-up correctly.
    • Configure PHP and Apache. Turns out the mac already has these resources. Just enable them; I used this great article. The only difference was that my httpd.conf file was in /private/etc….and I used emacs, not pico :).
    • While you’re in the httpd.conf file, go through and change AllowOverride to All. It occurs a couple of times in the file, and it is most likely set to None. This change is necessary so that the .htaccess files can override this main configuration file.
    • You are going to need the PHP extensions mcrypt and curl. Curl was simply uncommenting the line extension=php_curl.dll in the php.ini file (also in /private/etc on my machine). Mcrypt was a bit more complicated, and I used this article.
  2. Download mysql.
    • I just used the 32 bit version, and got the dmg package for an easy install.
    • I also had to change the mysql socket path in the php.ini. I ran locate for mysql.sock, and found out that it was in /private/tmp. This is the line in the php.ini file that needs to be changed: pdo_mysql.default_socket=/var/mysql/mysql.sock . So I changed mine to: pdo_mysql.default_socket=/private/tmp/mysql.sock
  3. Download the latest version of Magento,
    • Go through the installation guide wiki. The rest of the steps here are essentially notes from when I went through this guide.
    • Make sure to put the magento file into your /Sites directory.
  4. Throughout the process, I had to change several directory permissions so they were writable, using sudo chmod 777 directory_name from the command line.
  5. To create the database, I thought about downloading phpMyAdmin, then decided I’d downloaded enough stuff and just used mysqladmin from the command line. I named it magento, for simplicity, and because they seem to be very picky about some things. The sample data which you need to import into the database can be found here, the same download page as the step above.
  6. Once you open the installation wizard in your browser, http://localhost/~username/magento/, it should tell you anything your system is missing, or if it’s configured incorrectly. I did a lot of google searches to get through this portion. This is where I discovered that I did not not have the curl and mcrypt extensions enabled on my mac.
  7. Then came the problem that took a ridiculous amount of time and googling to solve; always have to have one of those, and of course the solution was insanely simple.
    • I got stuck on the configuration page. Literally stuck; every time I pushed submit, it would just reload the same page. Over and over again.
    • Finally, I found the answer in this angry forum.
    • It doesn’t like “localhost.” You have to put 127.0.0.1. That’s it. That was the problem.
    • I ignored the correct answer for a while, because I checked my hosts file (in /private/etc), and it had it listed perfectly fine.
  8. This is when I figured out that my mysql socket path was wrong in the php.ini file (step 2 above), when I got the error message SQLSTATE[HY000] [2002] No such file or directory. Database connection error.
  9. I let Magento create an encryption key for me in the admin setup stage.
  10. After all that, I was good to go, and finally got that happy You’re All Set! page.
This entry was posted in Uncategorized. Bookmark the permalink.

2 Responses to Magento Install, Mac OS X 10.6.4

  1. capemaster says:

    hey…
    php_curl.dll won’t work in Os X.

    if you have 10.6.4 curl is already activated.

  2. Rachel says:

    Thanks for the fyi…..mine for some reason wasn’t already activated, so I had to go in and uncomment that line.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s