How to setup an ubuntu server

1. Setup the firewall

2. Remove root login and Password login and use key based authentication instead

3. Install the base packages

4. Install java

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
#sudo update-alternatives --config java