November 30, 2014

November 30, 2014
In this article, we are going to discuss about How to install Magento on Ubuntu. Magento is a feature-rich, open-source, enterprise-class platform that offers merchants a high degree of flexibility and control over the user experience, catalog, content and functionality of their online store.

Here are the steps to install Magento on ubuntu with sample data.

Create a database :

Use the below command to create a database for magento on ubundu.

mysql -u root -p

mysqladmin -u root -p create magento_test;

mysqladmin -u root -p reload;

GRANT ALL ON magento_test.* TO magento_test@localhost IDENTIFIED BY 'magento_test_password'

Install Magento :

This is almost the same as above, except you don't need to know the directory name. You will only have to replace DBHOST, DBNAME, DBUSER, and DBPASS.


tar -zxvf magento-


tar -zxvf magento-sample-data-

mv magento-sample-data-* magento/media/

mv magento-sample-data- magento/data.sql

cd magento

chmod -R o+w media var

mysql -h DBHOST -u DBUSER -pDBPASS DBNAME < data.sql

chmod o+w var var/.htaccess app/etc

cd ..

rm -rf magento-sample-data- magento- magento-sample-data- magento/data.sql

Go to www.DOMAIN.NAME/magento/ and follow the online installation guide.

Errors may occur during fresh installation :

WARNING: your Magento folder does not have sufficient write information

following is 100% safe to run from the directory where Magento is installed:

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
chmod o+w var var/.htaccess app/etc
chmod 550 mage
chmod -R o+w media

If that is not working, try setting all directories to 777 by doing this:

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 777 {} \;
chmod o+w var/.htaccess
chmod 550 mage


Post a Comment