admin/ March 18, 2016/ Linux, Magento2/ 3 comments

Install LAMP (Linux Apache Mysql Php) on Ubuntu Server.

Add ppa for the php 5.6 and mysql 5.6.

Install required packages using below commands.

Find the line which declares the memory limit for PHP and change it to your desired number (in this case, 512MB).

add the below line bottom of the file or remove the comments quote from php.ini
always_populate_raw_post_data = -1

Replace the below line -:


Enable apache rewrite module.

To restart apache server


Create Database
Now login to your mysql server with admin privileges and create a database and user for new magento 2 installation.

Magento2 setup via github development.
download the magento2 zip
Note-: click on download zip

Git Clone using below command.

Run command to install the magento2 dependencies.

if composer is not installed.
(use the below command to install composer)

if prompt while composer install

Register on
Login with your email and password.
Click on “My Account” > “Connect” tab > Secure Key
You will find the Public Key and Private key.
Add key using or regenerate and use in below


To change the permission of current directory.

Edit .htaccess file of main folder and set RewriteBase with your application directory name.

Follow the Magento Installer Steps.
Your Magento2 Setup is ready.

http://< ip > /magento2-2.0/
http://< localhost >/magento2-2.0/

Schedule Magento2 Cronjobs

Finally schedule the backgound cronjobs for your magento2 installation. These cronjobs does some activities like, re-indexing, Newsletters, Update of currency rates, sending automatic emails and generating sitemaps etc. To schedule these jobs edit crontab file

and add below cronjobs at the end of file and save it.


  1. Thanks for sharing this tutorial. I doubt it will work though, because this will install MySQL 5.5 whereas Magento 2 requires MySQL 5.6.

    1. Hi Nick Weisser,
      Thanks for the suggestion. Please use the below ppa to install Mysql 5.6 installation.

      sudo apt-get install -y software-properties-common
      sudo add-apt-repository -y ppa:ondrej/php5-5.6
      sudo add-apt-repository -y ppa:ondrej/mysql-5.6
      sudo apt-get update
      sudo apt-get install -y mysql-server php5

      I have also updated in my blog.

      Thanks again

  2. Hello thx you for your article ! i was in a troube since 1 week for install magento on my local server. thx a lot

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.