Set locale

In /etc/default/locale, set the following

1
2
3
LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8
LC_ALL=en_US.UTF-8

Update apt-get

1
$ sudo apt-get update

Install Nginx

1
$ sudo apt-get install nginx

Try http://ip-address to see if nginx loads properly

Install MySQL Server

1
$ sudo apt-get install mysql-server

Install PHP

1
$ sudo apt-get install php-fpm php-mysql

Install phpmyadmin

1
$ sudo apt-get install phpmyadmin

Create symlink of phpmyadmin with

1
$ sudo ln -s /usr/share/phpmyadmin /var/www/html

NOTE: Change nginx sites-available for php and phpmyadmin

Create New User for phpmyadmin

1
$ sudo mysql --user=root mysql
1
2
3
> CREATE USER ‘admin’@‘localhost' IDENTIFIED BY 'some_pass';
> GRANT ALL PRIVILEGES ON *.* TO ‘admin’@‘localhost' WITH GRANT OPTION;
> FLUSH PRIVILEGES;

Create swap file

Digitalocean Tutorial

Check if swap exists with

1
$ free

Create swapfile with

1
2
3
4
5
6
$ cd /var
$ sudo touch swap.img
$ sudo chmod 600 swap.img
$ sudo dd if=/dev/zero of=/var/swap.img bs=1024k count=1000
$ sudo mkswap /var/swap.img
$ sudo swapon /var/swap.img

Install Nodejs

1
2
$ curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
$ sudo apt-get install -y nodejs