run
apt-get update && apt-get upgrade
apt-get install nano curl screen htop git
(optional) disable ipv6 if apt-get update
can't resolve via ipv6
sysctl -w net.ipv6.conf.default.disable_ipv6=1
sysctl -w net.ipv6.conf.all.disable_ipv6=1
run
apt-get purge nscd bind9 sendmail apache2 apache2.2-common -y
run
nano /etc/apt/sources.list
add these lines
deb http://packages.dotdeb.org jessie all
deb-src http://packages.dotdeb.org jessie all
run
wget https://www.dotdeb.org/dotdeb.gpg
apt-key add dotdeb.gpg
apt-get update
Open https://downloads.mariadb.org/mariadb/repositories/
Select Debian
> Debian 8 "Jessie"
> 10.0 [Stable]
> Choose country
Or run commands below
for ID
apt-get install software-properties-common
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db
add-apt-repository 'deb [arch=amd64,i386] http://mariadb.biz.net.id/repo/10.0/debian jessie main'
for US
apt-get install software-properties-common
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db
add-apt-repository 'deb [arch=amd64,i386] http://ftp.osuosl.org/pub/mariadb/repo/10.0/debian jessie main'
run
apt-get update
apt-get install nginx php5-fpm php5-common php5-mysqlnd php5-dev php5-cli php5-memcache php5-curl php5-mcrypt php5-xsl php5-gd php5-xmlrpc mariadb-server
Open https://www.random.org/passwords/?num=5&len=12&format=html&rnd=new to generate password for mysql
Open https://gist.github.com/ghprod/07dea09c5101ea19cf6c
Open https://gist.github.com/ghprod/f27df1d9577688a8d7ea
run
useradd -s /bin/false nginx
mkdir -p /home/nginx/domains/default/{logs,public_html}
chown -R nginx: /home/nginx
cd /home/nginx/domains/default/public_html
wget https://www.adminer.org/latest-mysql-en.php -O d.php
echo "<?php phpinfo();" > i.php
chown -R nginx: /home/nginx
service nginx restart && service php5-fpm restart
Test disk speed
dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync
Run command as nginx
nano ~/.bashrc_aliases
# OR
nano ~/.bashrc
Add
alias asnginx="su -s /bin/bash nginx && cd /home/nginx"
Run
source ~/.bashrc_aliases
# OR
source ~/.bashrc
For switch PHP version including one in CLI
https://gist.github.com/halkyon/15bcf89ccf4e25548b2ac3f334e0cd0d