Completed List Setup Ubuntu run Magento 2

Completed List Setup Ubuntu run Magento 2

First step: >> Install Apache web service and virtual host to Ubuntu

Second Step: >> Install PHP v7.0

Verify PHP is installed

To verify if PHP is installed already, enter php -v. If PHP is installed, messages similar to the following display:

PHP 5.6.4-1+deb.sury.org~precise+1 (cli) (built: Dec 21 2014 19:26:25) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2014 Zend Technologies with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies

Install PHP7 On Ubuntu 1: Enter the following commands in the order shown:

sudo apt-get -y update
sudo apt-get install -y php7.0 libapache2-mod-php7.0 php7.0 php7.0-fpm php7.0-common php7.0-gd php7.0-mysql php7.0-mcrypt php7.0-curl php7.0-intl php7.0-xsl php7.0-mbstring php7.0-zip php7.0-bcmath

2: Enter the following command to verify PHP 7 installed properly:

php -v

Following is a sample response that indicates PHP 7.0.x is installed:

PHP 7.0.8-2+deb.sury.orgtrusty+1 (cli) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.8-2+deb.sury.orgtrusty+1, Copyright (c) 1999-2016, by Zend Technologies

>>

[

More information

](http://devdocs.magento.com/guides/v2.1/install-gde/prereq/php-ubuntu.html)

Third Step: Install MariaDb

Why mariadb ??? >>>

[

More info

](https://seravo.fi/2015/10-reasons-to-migrate-to-mariadb-if-still-using-mysql)

  1. MariaDB development is more open and vibrant 2) Quicker and more transparent security releases 3) More cutting edge features 4) More storage engines 5) Better performance 6) Galera active-active master clustering 7) Oracle stewardship is uncertain 8) MariaDB has leapt in popularity 9) Compatible and easy to migrate 10) Migration might become difficult after 2015

1: Enter the following commands in the order shown:

sudo apt-get -y update sudo apt-get -y install mariadb-server mariadb-client

2: Fix Can’t login with root user: Run follow command:

sudo mysql -u root
GRANT ALL PRIVILEGES ON `%`.* TO 'root'@'localhost' IDENTIFIED BY '[user password]' WITH GRANT OPTION;
FLUSH PRIVILEGES;

These commands set User root login by

**

localhost

**

using password

**

[user password]


Next Step (Install Magento 2 Application)