Apache · Apache 2.4 · e-Commerce · LAMP · Magento · Ubuntu · Ubuntu 14.04 · Web Server

Installing Magento 1.9 on Ubuntu 14.04

Magento needs a working LAMP stack. Let start off the installation by setting up a LAMP stack first. It can be done using the following command.

apt-get update
apt-get dist-upgrade
apt-get install lamp-server^

We would also need the extension packages php5-gd, php5-curl, php5-mcrypt as dependencies. Let’s install these 3 packages as well and enable appropriate extensions as well.

apt-get install php5-gd php5-curl php5-mcrypt
php5enmod mcrypt

Let us now configure the database for Magento. We would need to create a database and grant prvileges for a user.

mysql -uroot -p
mysql> create database magento;
mysql> GRANT ALL ON magento.* TO 'magentouser'@'localhost' IDENTIFIED BY 'magentopassword';
mysql> quit

Magento web application is available in tar.gz or zip format. We will be downloading the Magento application in tar.gz. For that, we need to login to Magento web page link. Once downloaded, copy the file to the server and extract it.

tar -xzvf magento-

Let us now transfer the package files to the apache root directory i.e. /var/www/html.

rsync -avz magento/ /var/www/html

We need to have appropriate ownership for the files in /var/www/html. Let us change that now.

cd /var/www/html
cp errors/local.xml.sample errors/local.xml
chown -R www-data:www-data *

We need to make the file index.php as the first file for apache to load. We can edit the file ‘/etc/apache2/mods-available/dir.conf’ and change the following line to look like this.

DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm

Once this is done let us restart Apache service

service apache2 restart

Now we can load Magento by using the following URL. We need to replace the ‘ip-address’ with appropriate IP of our server.


The admin page can be accessed using the following address.


2 thoughts on “Installing Magento 1.9 on Ubuntu 14.04

  1. My coder is trying to persuade me to move to .net from PHP.

    I have always disliked the idea because of the expenses.
    But he’s tryiong none the less. I’ve been using WordPress on numerous websites for about a year and am
    anxious about switching to another platform. I have heard great things about blogengine.net.

    Is there a way I can transfer all my wordpress content into
    it? Any help would be really appreciated!

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 )

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