Last Updated on 2 days by Sachin G
These steps helps you install and configure Magento 2 eCommerce software on Linux servers. It covers prerequisites like Apache/Nginx, PHP, MySQL, downloading Magento, unpacking files, setting permissions, creating a database, and running the Magento installer through the web interface for a complete setup.
There is lots of merchants’ website uses trustable eCommerce software, Magento. It is an open-source software application which is owned by eBay. It works on open source LAMP stack. Magneto used high resources on server , for basic server , php needs minimum 512MB of RAM to run php application. This guide will help you to set up Magento software for web platform on Linux based flavor systems.
ECommerce Magento 2 Prerequisites
Web servers : Apache 2.2 >= ( mod_rewrite ) module
Nginx 1.8 >=
DataBase : MySQL 5.6 / Oracle / Percona
PHP : Supports PHP 5.6.5 or Greater than this version
PHP 7.0.2 ( Magento version 2.0.1 and later version supported )
PHP Extension : bc-math ,ImageMagick 6.3.7>=curl,gd,intl,mbstring,mcrypt,,PDO/MySQL,SimpleXML,soap,xml,xsl,zip,mhash,openssl[/box]
Download Magento Community Edition
Magneto is available on two type of edition one is community and other type is Enterprise . Here in this tutorial guide, we are going to setup Magento 2.0.2 , this version 2.0.2 is relased after fixed issues that some users having problem in upgrading from 2.0.0 ==> to version 2.0.1 ..
Download Magento2 from this official magent website [button link=”https://www.magentocommerce.com/download” type=”icon” newwindow=”yes”] Link text[/button]
The Magento download is available in two form one is with sample data , which is having some size and one community addition is without sample data. You can choose according to your need. You can see in below images also.
Configure Magento Code
I have download and unpacked the compressed archived file in opt directory through below command.
# mkdir /opt/magentocode # cd /opt/magentocode # tar xjf Magento-CE-2.0.2-2016-01-28-02-26-45.tar.bz2
After unpacked the bzip2 compress in magentocode directory , files will be extracted in the same path, Now you can remove compress archieved file from this location.
# cd /opt (Go into opt directory and rename and move magentocode directory to the web server document root. In Below command i have rename the directory magentocode into ecommerce and move it to default apache server document root and in apache server configuration path, set it of document root. # mv magentocode ecommerce # mv ecommerce /var/www/html
Now set the web server user permission, give correct permission.
# chmod –R 755 /var/www/ecommerce
Create Database and User
# mysql -u root -p Enter password: MariaDB[(none)]>CREATE DATABASE magentodb; MariaDB[(none)]>GRANT ALL ON magentodb.* to 'magentouser'@'localhost' IDENTIFIED BY '[ENTER_PASSWORD]'; MariaDB[(none)]> FLUSH PRIVILEGES; MariaDB[(none)]> quit
Run the Magento Website hosting url
Now run the Magento Website hosting url in browser then web installer will be do some steps and install magento newer version . you can run your web installer through below url.
http://ecommerce.example.com
I’m Sachin Gupta — a freelance IT support specialist and founder of Tech Transit. I’m certified in Linux, Ansible, OpenShift (Red Hat), cPanel, and ITIL, with over 15 years of hands-on experience. I create beginner-friendly Linux tutorials, help with Ansible automation, and offer IT support on platforms like Upwork, Freelancer, and PeoplePerHour. Follow Tech Transit for practical tips, hosting guides, and real-world Linux expertise!