How to install Magento 2?

  • Cubettech
  • Web App Development
  • 9 years ago

Magento 2 Installation Process
To install new Magento2 through following these steps –

Firstly you need to verify your prerequisites

  1. Apache 2.2 or 2.4 – to check your Apache version in ubuntu ‘apache2 -v’
  2. PHP 5.6.x or 5.5.x (PHP 5.4 is not supported) – to check php version ‘php -v’
  3. MySQL 5.6.x and upper – to check mysql -u -p

Once you meet the system requirements, install Magento software using command line.

  1. We need to ensure that the Composer is installed globally in your system. To check this typecomposer -help

if not installed then provide,

  1. curl -sS | sudo php mv composer.phar /usr/local/bin/composer
  2. Clone Magento2 from git
  3. Setting file system permissionchown -R :www-data .


  1. After cloning is complete, move to Magento2 folder cd <web-root>/magento2 then provide ‘composer install’.
  2. If sample data is not installed you can follow the following steps
    a. Make a copy of composer.json


  1. cp composer.json composer.json.bak

b. Open composer.json and add “minimum-stability”: “beta”, before version.

  1. Then provide the following commandcomposer config repositories.magento composer
  2. Next provide composer require magento/sample-data:1.0.0-beta
  3. Once above mentioned steps are complete, finally verify the installation by entering the base URL in the browser’s address. Now, you will be directed to the installation setup tool where you will be asked to enter the Database details and magento admin details.
    Magento 2 Installation Steps
    Note : During the Setup wizard if you are installing Magento2 in local system then make sure you provide the ip address instead of ‘localhost’.

Suppose if you install Magento2 with localhost and is not able to login to the admin side then you will have to make the following changes:

  1. Edit values of ‘web/unsecure/base_url’ &’web/secure/base_url’ in the table core_config_data by providing the IP address instead localhost
  2. Then clear cache in var/cache.

After these steps try to login, you will be able to login successfully.

Know More About This Topic from our Techies

Got a similar project idea?

Connect with us & let’s start the journey!

Questions about our products and services?

We're here to support you.

Staff augmentation is a flexible workforce strategy companies adopt to meet specific project needs or address skill gaps.

Begin your journey!
Need more help?