MGT Cloud Log is here!

How​ ​to​ ​install​ ​Magento 2​ ​Beta​ ​with​ ​Sample​ ​Data​ ​using​ ​MGT Development​ ​Environment

August 18, 2017 - Chinmaya Chandel # Magento 2 Beta, Magento 2 Beta with Sample Data


In the following tutorial, I want to show you how to install Magento 2 Beta with Sample Data using MGTDevelopment Environment. We are going to install Magento 2.2.0-rc2.0. Newer Magento 2 Versions can be found at GitHub:


You need to have Docker installed. If you do not have it already, you can follow our documentation below for the installation:

After Docker has been installed, run a Docker container (MGT Development Environment), following our tutorial below:

Magento 2.2 Beta Installation Steps

1. Login into your docker container with ssh by using the following command to connect

ssh root@
Password: root

2. Navigate to the home directory

cd /home/cloudpanel/htdocs/

3. Clone the beta branch from GitHub

git clone --branch 2.2.0-rc2.0

Git clonet

4. Install dependencies with composer

To install the dependencies go to the document root of your magento2 installation and execute the command "composer install."

cd /home/cloudpanel/htdocs/
composer install

5. Create Domain / NGINX Vhost in CloudPanel

To access Magento 2 in your browser later you first need to create a domain / vhost in your CloudPanel.

Open the browser and enter to access your CloudPanel.

Click in the menu on "Domains" and create the domain "" with Magento 2 Vhost Template.

Create Domain

6. Create a Database

For the installation, we need a MySQL database which can be easily created through CloudPanel.

Click on the left menu "Databases" and create a database with the name "magento2".

Create Database

6. Adding a hosts file entry

To resolve the domain, you need to add a hosts file entry in our /etc/hosts file.

If you don't know how to add an entry you can follow the instructions in our documentation:

After you have added the entry it should look like below:

Hosts File Entry

7. Install Magento 2 with the web based Setup Wizard. Open your browser enter to start with the installation.

Magento 2 Web Based Setup Wizard

When you enter the database credentials use "root" as database username and password.

Installing the Sample Data for Magento 2 Beta

1. Login into your docker container with ssh by using the following command to connect

ssh root@
Password: root

2. Go to htdocs directory and clone magento2 sample data repository

cd /home/cloudpanel/htdocs/
git clone --branch 2.2-develop magento2-sample-data

3. Build Sample Data symlinks by executing the following command

php -f /home/cloudpanel/htdocs/magento2-sample-data/dev/tools/build-sample-data.php -- --ce-source="/home/cloudpanel/htdocs/"

4. Install sample data by executing the setup:upgrade command

php /home/cloudpanel/htdocs/ setup:upgrade

5. Reset file owner and permissions

chown -R clp:clp /home/cloudpanel/htdocs/
chmod -R 775 /home/cloudpanel/htdocs/

6. Open in your browser and enjoy the latest Magento 2 beta with Sample Data