Magento is an eCommerce open source application that was bought by eBay, Inc. It’s a very popular eCommerce web application that runs on top of many opensource applications, like Apache, MySQL and others.
It helps independent sellers sell their stuff and engage with customers easily.
This brief tutorial is going to show you how to easily install it in Ubuntu 14.04 and maybe future versions. If you correctly follow the steps below, you’ll have a fully functional Magento eCommerce application ready to use on your Ubuntu machine.
This tutorial may also apply to future Ubuntu releases as they don’t change much. Magento also depends on the LAMP Stack.
The LAMP stack represents Linux, Apache, MySQL and PHP. These opensource application allows for feature-rich applications like WordPress and Magento to run and function.
When you’re ready, continue below to begin the process.
- Installing the LAMP stack in Ubuntu
As we mentioned above, Magento won’t function without the LAMP stack. To get the stack installed in Ubuntu, follow the steps below.
Install Apache2 web server by running the commands below.
sudo apt-get install apache2
To start Apache web server, run the commands below
sudo service apache2 start
Next, open Apache default site configuration file in Ubuntu, then add the directory block below if the block isn’t in there already. If it’s there, then make sure it matches the block below highlighted in red:
sudo vi /etc/apache2/sites-available/000-default.conf
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
- Install MySQL database server by running the commands below.
sudo apt-get install mysql-server mysql-client
While installing MySQL database, you’ll be prompted to create a root password for the database. Create it and remember it.
To start the database server, run the commands below
sudo service mysql start
After installing the database server, you should go and create a database and its user for Magento. To do that, run the commands below to logon to the database server.
mysql -u root -p
Then run the SQL statement below to create a database called magento
CREATE DATABASE magento;
Next create the database user called magentouser with password;
CREATE USER magentouser@localhost IDENTIFIED BY 'user_password';
Finally, grant all privileges to magentouser for magento database.
GRANT ALL ON magento.* TO magentouser@localhost;
- Install PHP5 and other modules by running the commands below
sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt php5-gd php5-mysql php5-tidy php5-xmlrpc php5-curl php5-common php5-cli php5-ldap php5-xml
After installing PHP5, go and increase its memory limit from 128MB to 512MB. To do that, run the commands below to open the configuration file.
sudo vi /etc/php5/apache2/php.ini
Change the line below:
memory_limit = 128M
Change to:
memory_limit = 512M
Save the file.
- Downloading Magento files.
The next step is to download Magento file and save it on the server. To do that, run the commands below to grab
cd /tmp/ && wget http://www.magentocommerce.com/downloads/assets/1.9.0.1/magento-1.9.0.1.zip
Next, extract the downloaded file.
unzip magento*.zip
The copy over the extracted files to the default Apache root directory, which is at /var/www/html/
sudo cp -rf magento/* /var/www/html/
Then change the ownership of the folder to Apache.
sudo chown -R www-data:www-data /var/www/html/
Change the permission of the files by running the commands below.
sudo chmod -R 755 /var/www/html/
Restart Apache and try connecting to the server.
sudo service apache2 restart
If everything was correctly followed, you should get he default Magento setup page as shown below.
Continue with the setup
After setting it up as explained above, your site should up and running.
Enjoy!
Frequently Asked Questions
How to install Magento eCommerce application on Ubuntu 14.04?
To install Magento on Ubuntu 14.04, you need to follow a series of steps which include setting up the LAMP stack comprising Linux, Apache, MySQL, and PHP. Detailed instructions can be found in the article.
What is the significance of the LAMP stack for Magento installation?
The LAMP stack, consisting of Linux, Apache, MySQL, and PHP, is essential for Magento to function properly. It provides the necessary environment for running feature-rich applications like Magento.
How can I install Apache2 web server on Ubuntu for Magento?
You can install the Apache2 web server on Ubuntu by running 'sudo apt-get install apache2'. After installation, start the Apache web server by running 'sudo service apache2 start'.
What is the role of MySQL in Magento installation?
MySQL is required for Magento as it serves as the database server. During installation, you will be prompted to create a root password for the MySQL database.
Can the Magento installation process be applied to future Ubuntu versions?
Yes, the Magento installation process outlined in the article can be applied to future Ubuntu releases as they do not change significantly. It provides a step-by-step guide for installing Magento on Ubuntu 14.04 and potentially future versions.
Why is Magento considered a popular eCommerce web application?
Magento is popular due to its open-source nature and its ability to help independent sellers easily sell their products and interact with customers. It offers a feature-rich platform for eCommerce businesses.
What are the key components of the LAMP stack for Magento?
The LAMP stack comprises Linux, Apache, MySQL, and PHP. These components collectively provide the necessary infrastructure for Magento to run effectively on Ubuntu.
How can I start the MySQL database server after installation?
To start the MySQL database server after installation, run the command 'sudo service mysql start'. This will initialize the MySQL server and allow it to function properly for Magento.