Installing Magento Commerce on DreamHost
*One quick update*
Thanks to Ashley for mentioning that I didn’t add the prefix option as an argument. Added it to the script and updated the content below to show how to use it.
-JJ
There has apparently been quite a few people having trouble with the Magento install on DreamHost. I was among them, so I took the advice of fellow co-workers and used the command line method for installation. It worked, but I figured it could be easier so I threw together a bash script for that purpose. You can grab a copy from the following url and save it to the folder you want magento installed in.
http://www.gimmesoda.com/install_magento.sh
You can also run these commands from the folder you will be installing it to.
wget http://www.gimmesoda.com/install_magento.sh;
wget http://www.magentocommerce.com/downloads/assets/1.3.2.4/magento-1.3.2.4.tar.gz;
chmod +x install_magento.sh;
To make it easier you don’t need to hard code any of your variables, rather you just enter them through arguments for the script:
./install_magento.sh
In order to install Magento all the following are required.
-h: MySQL Database Hostname
-d: MySQL Database Name
-u: MySQL Database User
-p: MySQL Database Password
-x: Database Prefix
-a: Magento Shop Address (Example: http://shop.example.com/)
-f: Magento Admin First Name
-l: Magento Admin Last Name
-e: Magento Admin Email Address
-r: Magento Admin Login
-s: Magento Admin Pass (Must have letters and numbers.)
Which ends up looking like this:
./install_magento.sh -h mysql.example.com -d database -u dbuser -p dbpass -x prefix -a http://store.example.com/ -f First -l Last -e admin@example.com -r admin -s adminpass1
If everything worked as expected (running this on DreamHost it should) you’ll be prompted with something similar to this:
SUCCESS: 88dd17d566d65128b6bb9357773d269b
Which is the Magento encryption key and is rather important, so the keep a copy of that key. I’ll be adding a cleanup argument to this script which will remove all files from the install directory, which is useful in the case of errors. If you have any questions just let me know!
I cannot thank you enough for this script! I have a client who insisted on hosting their newly created Magento site with Dreamhost, and this is the ONLY solution I found that actually worked! You’re a life saver!
You’re welcome David! I’m glad it worked out for you.
Thank you so much for this. I’ve followed some other tutorials and they didn’t work. This was by far the easiest. I’m def gonna “Buy you a soda”.
Thank you very much, your time and effort is much appreciated!
Hi Jose,
I was wandering for how to install magento in Dreamhost for a couple of hours and found your post here. i hope this really works better then the rest. But sorry to ask this I’m quite new to this shell programming and other stuffs, so can u tell where I’m supposed to type in this command, but any way I created a shell user in my account.But can’t find where to do this. I have a shared hosting account with DH.
Thanks in Advance !
It’s NOT a good idea to run Magento on shared hosting with DH. If you want to get good performance you need to run it on a PS. Other then that you need to read up on SSH:
http://wiki.dreamhost.com/SSH
So you’ll login using ssh to execute the commands.
Thanks a lot for taking the time to post this, it looked very promising even through installation. The first time it failed because I did not have a number in my admin password. But now it is throwing an error: FAILED
ERROR: Invalid mode for clean() method
Do you have any ideas what would cause this? Is it a pear thing or is this trying to remove the magento directory?
The thing is that my homepage still loads, I was able to submit a poll in the sidebar, but when I go to the admin login page, I enter my credentials and it throws me another error: Error log record number: 391738256155
Do you know how I can view the log?
Thanks again,
Mike
Personally, I would clear out the database and remove all your files, then go through the install again. No clue about the log as I haven’t seen errors like this yet.