magentoI was very excited to install magento on Ubuntu instance after launching Ubuntu instance on Amazon. It is so simple to install,
Lets start,
There are four steps involved in installing the Magento Ecommerce on Amazon Ubuntu instance.

See Also : Our Magento Extensions

Launch Amazon EC2 Ubuntu instance.

Connect Amazon Ubuntu instance using SSH client Putty.

  • Once you connect to instance using putty, follow this simple steps,
    • Update Ubuntu by using this command:
      Command: sudo apt-get update

Install LAMP stack on Ubuntu instance. LAMP (Linux Apache MysqlPhp)

  1. Install MySql by using following commands,
    sudo apt-get install mysql-server
    sudo apt-get install mysql-client
    sudo apt-get install libmysqlclient15-dev

    o   It will take few seconds to install. Then give a password of your 
        choice and remember it.  It will be useful later on.
  2. Install Apache2 by using below given command,
    Command: sudo apt-get install apache2
    Install following packages also,
    apache2-doc, apache2-mpm-prefork, apache2-utils, libexpat1,ssl-cert.
  3. Install php5 by using this command,
    Command: sudo apt-get install php5
    Install following packages also,
    libapache2-mod-php5, php5, php5-common, php5-curl, php5-dev, 
    php5-gd, php5-idn,php-pear, php5-imagick , php5-mcrypt, php5-mysql, 
    php5-ps, php5-pspell, php5-recode, php5-xsl.
  4. Install phpmyadmin by using this command.
    Command: sudo apt-get install phpmyadmin
  5. You will be prompted to choose the type of web server for phpmyadmin. 
    Just choose “Apache2″  (use space bar and enter key for selecting ). 
  6. After selecting you will be asked if you want to configure with 
    database. Select yes and provide the database password which you 
    have given during Mysql installation.

    [Note: You have to enter the password three times]

  7. Point your browser to http://your-ip-address/phpmyadmin you will
    get phpmyadmin login page, If you get Not Found page then try this
    command, it may help you.
    Command: sudo ln -s /usr/share/phpmyadmin /var/www
  8.  Once you complete the above steps, you are done with the LAMP stack installation.

Install Magento on the Ubuntu instance.

After installing the LAMP stack we have to install the Magento installation file in the
www folder.
/var/www is the root directory for your magento website. Magento has to be installed
inside www directory.
www folder contains the index.html file, which will be there by default.

  1. Now go to Magento website and copy the link of the installation file.       
  2. To download Magento to your Ubuntu instance type the following command,
    Command: sudo wget
    Note: While using this command make sure you are on  /var/www folder
  3. Once Magento gets installed Go to # cd /var/www and type
    Command: sudo rm index.html
    [It will remove the index.html file from the www folder]
  4. The installed Magento file will be in .tar format, Inorder to extract it , 
    type following command,
    Command: sudo tar -zxvf magento-
  5. Now change the permission ofmagento to write on your file system using,
    Command: sudo chown www-data:www-data -R magento-
  6. Now point your browser with the public DNS name of your Ubuntu instance   
    [Eg:].You can see the magentofiles.
  7. Click magento- and continue the installation process.During the 
    process it will ask for database name, user name and password. Now open 
    a new tab and type your ec2 public DNS name followed by phpmyadmin  
    You will have to provide the user name as root and password is one 
    which you used during the Mysql installation. 
    Once you enter the credentials click login.
  8. Now Go to--> Privileges-->Add new user Enter the user name,password of your 
    Give the host name as localhost. and under database user click the second 
    option and click create user.
  9. Now go back to the tab where we left and enter the database name, database 
    username, database password and click save and continue.
  10. In order to point to the public DNS of your magento, you have to put all the 
    magento files in one folder and put it inside the www folder. Go to putty 
    and type the following codes.
    Command: sudo mv magento- magento
  11. Restart apache by using this command,  
    Command: sudo cd /etc/init.d/apache2 restart
    You are done!! You can now manage your Magento using your public DNS of 
    Ubuntu instance.
    Ask us for any help if you need while installing Magento on Ubuntu instance,
    Post comments if you face any problem during installation, we will happy to 
    assist you.
GD Star Rating
Launch Magento on Amazon EC2 with Ubuntu in easy steps, 5.0 out of 5 based on 3 ratings

  1. kunal

    which instance is good to make the site load faster in ubuntu . I now shifted from micro to small

    GD Star Rating

  2. Indies

    M3 Extra Large Instance 15 GiB of memory, 13 EC2 Compute Units (4 virtual cores with 3.25 EC2 Compute Units each), EBS storage only, 64-bit platform provides customers with a balanced set of resources and a higher level of processing performance compared small instances.

    GD Star Rating

  3. anas

    Please note that S is capital letter in Sudo, it should be:
    sudo ln -s /user/share/phpmyadmin /var/www


    GD Star Rating

  4. Indies

    Ohhh, thank you so much for making us notified. We have altered the text mentioned by you.

    GD Star Rating

Leave a comment

Last Tweet

  • "Upgrade your magento store to Magento 1.7"
  • " Indieswebs Magento Blog talks about learning, relearning and unlearning coding , designing and development of magento stores one blog at a time. "