Install nginx php-fpm magento 2

Install nginx php-fpm magento 2
Facebooktwitterredditpinterestlinkedinmail

Install nginx php-fpm magento 2

Setup dedicated server or Amazon ec2 instance for magento 2. Install nginx, php-fpm and MySql server and setup virtual host configuration.

Installation of server.

$sudo apt-get update
$sudo apt-get install nginx -y

Installing php, php-fpm supported extension for magento 2

sudo apt-get -y update
sudo add-apt-repository ppa:ondrej/php5-5.6
sudo apt-get -y update
sudo apt-get -y install php5 php5-mhash php5-mcrypt php5-curl php5-cli php5-mysql php5-gd php5-intl php5-xsl

Installing MySql 5.6

apt-add-repository ppa:ondrej/mysql-5.6
apt-get -y update
apt-get -y install mysql-server

If you get error :
Sub-process /usr/bin/dpkg returned an error code (1)
Increase the memory limit of swap
Create a 4G swap file:

sudo fallocate -l 4G /swapfile

Change its permission to only root could access and change:

sudo chmod 600 /swapfile

Make it swap:

sudo mkswap /swapfile

Activate:

sudo swapon /swapfile
Facebooktwitterredditpinterestlinkedinmail