Installing Magento on Ubuntu 9.04 Server

Last modified by godind on Thu, June 24, 2010 15:22
Source|Old Revisions  

This is an old revision of the document!


(This is mostly a copy from Installing Magento on Slicehost with Ubuntu)

(I am not sure if this belongs in the Wiki, but it seemed like the most logical place to store it.)

I am by no means a Linux expert. This is how I got Magento working. I HAVE NOT TESTED THIS INSTALLATION THOROUGHLY, SO PLEASE BE AWARE IT IS BY NO MEANS COMPLETE.

THIS GUIDE DOES NOT COVER HOW TO CREATE A MYSQL USER ACCOUNT, MYSQL DATABASE FOR MAGENTO, MAIL SERVER, NOR SSL.

NOTE: ALTHOUGH YOU CAN RUN ALL THE FOLLOWING AS THE ROOT USER, IT IS STRONGLY ADVISED THAT YOU CREATE A NON-ROOT ACCOUNT AND RUN COMMANDS WITH SUDO.

1. If not already done, go ahead and create a LAMP Server (Linux, Apache, MySQL, PHP) by running the following command:

sudo tasksel install lamp-server 

BE PATIENT… a blue installation progress screen will appear, but it won’t look like it’s making any progress (well, this is what happened to me). Wait about 5-10 minutes, and when it’s done, the screen will disappear with the installation being complete.

2. Lets update apt-get:

sudo apt-get update
sudo apt-get upgrade

3. Now you need to install php5 curl which is used by Magento and the php command line interface used by the pear installation script:

sudo apt-get install php5-curl
sudo apt-get install php5-cli

4. Now we need to edit both the php command line and the apache2 config file and increase the memory limits so the pear script and Magento can run. /etc/php5/cli/php.ini /etc/php5/apache2/php.ini Set memort_limit to 64M

NOTE: I have no idea if this is the proper number but from other posts it seems good.

7. Now install mcrypt by running the following command:

sudo apt-get install php5-mcrypt 

8. Now you need to enable mcrypt by editing the php.ini file:

sudo nano /etc/php5/apache2/php.ini 

Add the following line to the very end of php.ini to enable mcrypt:

extension=mcrypt.so 

8.a If you are running Ubuntu 8.04 Hardy, you might have to do the same to /etc/php5/cli

sudo nano /etc/php5/cli/php.ini

Add the following line to the very end of php.ini:

extension=mcrypt.so 

9. Now you will need to generate new Symlinks in /etc/apache2/mods-enabled so that Apache 2 enable the extension for URL rewriting. There is an easy way to do it in Ubuntu/Debian. Just type:

sudo a2enmod rewrite

and the corresponding symlinks get created.

In order to make Magento work correctly, this piece of configuration (taken from the installation guide http://www.magentocommerce.com/knowledge-base/entry/magento-installation-guide comment #40) needs to be put at the end of /etc/apache2/apache2.conf (this is assuming that Magento is going to be installed in /var/www/magento—if not, please edit the path accordingly):

<Directory "/var/www/magento">
AllowOverride All
</Directory> 

10. Now you need to restart Apache for the PHP settings and the Apache settings to take affect:

sudo /etc/init.d/apache2 restart

11. Now you need to install Magento, but before you can do that, you need to install Subversion, the source code manager that Magento was developed with. Run the following command to install Subversion:

sudo apt-get install subversion 

12. Now that Subversion is installed, we can download Magento using Subversion by running the following commands:

cd /var/www
sudo svn checkout http://svn.magentocommerce.com/source/branches/beta-0.6-latest 

13. Rename the directory “beta-0.6-latest” to “magento”

sudo mv beta-0.6-latest magento 

(as mentioned above, this guide has not covered how to create a MySQL user, MySQL database or SSL configuration—you will obviously need to do this for a production / live website… please consult guides on the internet or in books as to how to accomplish this… they will need to be done before the installation step mentioned next)

14. Now install Magento using the installation wizard. In your browser, go to: http://website.com/magento

Magento will prompt you to change the permissions on a few directories, which you need to do before continuing.

Good luck!

Note: the sample product images don’t seem to have been downloaded using Subversion, so if you’re able to browse the demo store and don’t see any product images, don’t worry, they don’t exist because they weren’t downloaded! You will be deleting them anyway, right? :-)

Created Sept. 10, 2007 by Jonathan L.

Related Tags:  installubuntuinstallation



 

Magento 2 GitHub Repository

Magento Job Board - Some sort of tag line goes here

Latest Posts| View all Jobs