Install Nginx, PHP7-FPM, MariaDB on Debian

Simple tutorial on how to install the latest version of Nginx, PHP7 as PHP-FPM and MariaDB MySQL server 10.1 stable release on Debian servers. For installing Nginx and MariaDB we use the official Debian repositories and for installing PHP7 packages we use Dotdeb.org Debian repositories.

Install Nginx

Install Nginx PGP public key:

apt-key adv --recv-keys --keyserver keyserver.ubuntu.com ABF5BD827BD9BF62

Add Nginx Debian repositories:

add-apt-repository "deb http://nginx.org/packages/debian/ $(lsb_release -s -c) nginx"

Update apt-get database:

apt-get update

Install Nginx server:

apt-get install nginx

Install PHP 7 + PHP7-FPM

Install Dotdeb.org public key:

apt-key adv --recv-keys --keyserver keyserver.ubuntu.com E9C74FEEA2098A6E

Add Dotdeb.org Debian repositories:

add-apt-repository "deb http://packages.dotdeb.org $(lsb_release -s -c) all"

Update apt-get database:

apt-get update

Install PHP 7 as PHP-FPM:

apt-get install php7.0-common php7.0-fpm

Install PHP7-GD library:

apt-get install php7.0-gd

Install MariaDB

Install MariaDB PGP public key:

apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db

Add MariaDB Debian repositories:

add-apt-repository "deb [arch=amd64,i386] http://mirror.netcologne.de/mariadb/repo/10.1/debian $(lsb_release -s -c) main"

Update apt-get database:

apt-get update

Install MariaDB server:

apt-get install mariadb-server

More Related Posts