Last active
January 22, 2016 01:40
-
-
Save mrhyde/5062582 to your computer and use it in GitHub Desktop.
Lightning fast LEMP installation for Debian 8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
echo "Adding dotdeb apt repositories for Nginx and PHP 7.0" | |
echo "deb http://packages.dotdeb.org jessie all" > /etc/apt/sources.list.d/dotdeb.list | |
echo "deb-src http://packages.dotdeb.org jessie all" >> /etc/apt/sources.list.d/dotdeb.list | |
wget -O- http://www.dotdeb.org/dotdeb.gpg | apt-key add - | |
echo "Adding official MariaDB repositories" | |
sudo apt-get install software-properties-common | |
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db | |
sudo add-apt-repository 'deb [arch=amd64,i386] http://mariadb.mirror.nucleus.be/repo/10.1/debian jessie main' | |
echo "Updating apt" | |
sudo apt-get update | |
echo "Installing Nginx" | |
sudo apt-get install nginx | |
echo "Installing PHP-FPM" | |
# unfortunately there is no `php-gd` and `php-imagic` modules for this version atm | |
sudo apt-get install php-fpm php-cli php-mysql php-curl php-mcrypt php-json | |
echo "Installing MySQL" | |
sudo apt-get install mariadb-server mariadb-client | |
sudo mysql_secure_installation | |
echo "Installing Fail2Ban and iptables-persistent" | |
sudo apt-get install fail2ban iptables-persistent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
updated to support PHP 7.0 and MariaDB, works on Ubuntu too