How to install Magento 2 in CentOS – Part 04

Here we’ll continue by creating Mage Database to install Magento CentOS 7. For creating Mage DB we’ll need to follow these below steps:

We will sign a service level agreement to guarantee upto 99.99% uptime network-wide. Now enjoy our basic Mage hosting plan as lower as USD 9.99 per month!!!  

Tanzia Farin Chy – Aspiration Hosting

Install Magento Centos 7 – Mage DBase

First we need log in to Maria DB using the following commands.

mysql -u root -p

Simply to create a new DB, run the query following query using below command.

MariaDB [(none)]>create database magento;

As we created a new DB, we have to add a user. Also we need to give admin access to the user for accessing DB. Here following are the commands to follow:

MariaDB [(none)]>grant all on magento.* TO magentouser@localhost identified by 'Admin@2018';

MariaDB [(none)]>flush privileges;

However, Attention: As long as we can use any suitable name and password for new DB. But it’s our duty to apply strong password for further DB security reason.

As we’ve done. So, enter the following command to exit from MySQL prompt.

MariaDB [(none)]>exit

Install Magento Centos 7 – Install Composer

Now, we’ll use a Composer for PHP. Because PHP needs an application package manager for maintaining standard format of managing dependencies. So, the composer use PHP programming language and supplies required libraries. As a result we need to install a composer.  However run the following commands to install composer:

curl -sS | php

Next we need the composer.phar file. And the above mentioned command will download the latest version in our Home Directory.

For using composer, later we’ll need to move the file under following path:

/usr/bin/ directory:

sudo mv composer.phar /usr/bin/composer

As we’re almost done. So, it’s time to check the version of composer by using following command:

composer -V

If our everything goes right we should see the following output.


Composer version 1.2.4 2017-12-05 20:00:41

Now reading Part 04 | Part 01 | Part 02 | Part 03 | Part 05