Setting Up Magento 2 – A Detailed Overview

Majority of the online merchants choose Magento for setting up their e-commerce store owing to feature-rich and flexible e-commerce solutions it provides. And with the release of the much speculated Magento2, you can expect to enjoy better offerings of this open source platform. This post we’ll talk about the step-by-step installation process of Magento latest version.

Step 1 – Verify All the Prerequisites

In order to install the latest software, you will need to make sure that your system meets the below mentioned prerequisites.

  • Linux distributions like CentOS, Ubuntu etc.
  • Apache server 2.2 or later
  • PHP 5.4.x or 5.5.x version
  • MySQL 5.6.x

Step 2 – Install the Composer

Next, check out whether Composer is installed or not. For doing so, in the command prompt simply enter the below given commands:

If the above command help shows that the Composer is installed, then skip this step and proceed to the next one. But, in case an error is displayed, then you will need to install the Composer by using the following commands:

After meeting all the above discussed requirements, you can begin the installation process by following below steps:

Step 3 – Clone the Magento Github Repository

  1. To clone the Magento GitHub repository via secure shell (SSH), you’ll need to generate SSH keys. In addition, you will have to add the public key to github, Next, copy the repository SSH or HTTPS clone URL to your clipboard and follow these steps:
    • Visit the Magento GitHub repository.
    • Once you’ve entered the repository, on the right hand side, under the “HTTPS clone URL” field, you’ll have to choose SSH or HTTPS. And then, click on the “Copy to Clipboard” button enclosed within a red square, as shown in the screenshot below. This will help copy the github’s clone URL to your system’s clipboard.
      Copy From GitHub
  2. Now change to your server’s docroot directory by using the following commands:

    In case you’re using Ubuntu as your web server, then use the command /var/www. But, if you’re using CentOS you will need to use the command /var/www/html.

  3. You can clone the repository either using HTTPS or SSH using the below commands:
    For HTTPS: git clone https://github.com/magento/magento2.git
    For SSH: git clone git@github.com:magento/magento2.git
    Now you simply need to wait for the github repository to get cloned on your web server.

Step 4 – Changing File System Permissions and Ownerships

Now that you have cloned the github repository, you will have to set ownership of all your Magento files and directories.

All the files and directories have different access privileges (also referred to as permissions). Put simply, all the files and directories of the Magento install will have a set of permissions that allows users to perform some actions on them. For instance, owner can read the files and directories but cannot perform write operations on them. And so, you will need to change ownership of your files and directories to allows users to perform write operations.

It is recommended that you should set the permissions as follows:

  • Directories should have 700 permissions (drwx——). This means that the owner can perform the read/write/execute operations, however, rest of the users won’t be able to take any action on the directory. In order to set the permissions of the directories to 700 use the following command:
  • The files must have 600 permissions (-rw——-). This means hat the owner will be able to read the file and can perform write operations on it. However, other users won’t have any permissions. For setting up the file permissions to 600, use the below given command:

Step 5 – Create Database For Magento 2

Log into phpMyAdmin, and create a new database for the latest Magento software. You can also choose to utilize an existing database, and only need to select a table-prefix during the installation.

Step 6 – Install Magento 2 Using Installation Wizard

  1. Launch a web browser and enter the below mentioned URL in the browser’s address bar:

    For example, let’s assume your Magento server’s IP address is 119.0.1.10 and your latest Magento software is installed in the magento2 directory, then enter the following URL in your location bar:

  2. On the first page, you will see a “Agree and Set Up Magento” button. Simply click it.

    Magento2---Step1
  3. Now, to complete the installation process you will have to perform a “Readiness Check”.

    Magento2---Step2

Next, configure your newly created database.

Magento2---Step3

In the next step, you need to perform web configuration. This requires you to enter your store address and Magento admin address.

Magento2---Step4

You can customize your latest Magento installation, by moving to the “Customize your store” section.

Magento2---Step5

You will have to create an admin account.

Magento2---Step6

In the last step, just click on Install.

Magento2---Step7

That’s it! A message will be displayed on successful installation of the Magento software.