install magento centos 7

How to install Magento 2 in CentOS – Part 05

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

install Magento CentOS 7 – Downloading Mage

As we’ve already discussed different ways to install Mage in our earlier posts. So, today we’ll discuss a new method to do it.  Precisely we’ll use Git to download Mage. Later we’ll install Mage using composer.

Here install Mage by using following git command:

cd /var/www/html/

sudo git clone https://github.com/magento/magento2.git

As a result it will install Mage under the Apache’s default document root Directory. As we always recommend to use a stable release of Mage.

Next use the following command to do so:

cd magento2

sudo git checkout tags/2.1.0 -b 2.1.0

The above command will checkout to a stable version 2.1.0.

As a result, the above command will lead to a stable version.

Now we’ll move all of our installation files in to Apache’s document root:

sudo shopt -s dotglob nullglob

sudo mv /var/www/html/magento2/* /var/www/html/

install Magento CentOS 7 – Mage permissions

Next we’ll set up privileges by updating files and folders permission:

sudo chown -R apache:apache /var/www/html/

sudo chmod -R 775 /var/www/html/

install Magento CentOS 7 – Installing Mage

Suddenly, we’ll  now install Magento using the command:

cd /var/www/html

sudo composer install

install Magento CentOS 7 – Installing Mage – Web interface

Now we’ll wrap up the content by installing Magento using web based interface. As we wrote many detailed articles earlier about the interface, please follow the link to read about:

Mage web installation wizard

Surely the above mentioned link will be a great help to pass the Mage web installation setup wizard.

Now we’ll setup  cron jobs for Mage. Simply use following commands to configure :

crontab -u apache -e

Also include these following lines:

*/5 * * * * php -c /etc /var/www/html/bin/magento cron:run

*/5 * * * * php -c /etc /var/www/html/update/cron.php

*/5 * * * * php -c /etc /var/www/html/bin/magento setup:cron:run

Finally finish by saving the file.

install Magento CentOS 7 – Updating Mage

Later use the following commands for updating Mage to any Latest version:

cd /var/www/html

sudo composer update

So, we’ve successfully installed Mage in CentOS 7 . Enjoy using Mage with Aspiration Hosting!!!

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