This is an opinionated memo that lists the steps to set up an Ubuntu server for web service or website.
The step 1 is what I will do for all new servers, even for my personal Linux laptop.
# This step may take some time, just be patient
When this step is done, you can restart your server. But usually, I will restart after I have everything installed.
# Maybe most of them are already bundled with Ubuntu
I really like
zsh, and I will also enable oh-my-zsh. But this is optional, even I highly recommend it.
sudo apt install openjdk-11-jre mariadb-server nginx
I install open Java 11 here, based on your own requirement, you can either install Java 8 or Java 14, whatever you want. The reason why I just install JRE not JDK is because I will only need Java Runtime in this server, and I will never try to compile or build any Java projects.
# Check whether java is installed correctly
It is almost the same as MySQL. Personally, I choose Mariadb these days. An important reason is that they have different licenses.
If you take Open Source seriously, this is something that you should care. 如何选择开源许可证
# You should see similar output as below:
As a reverse proxy, NginX is very helpful. Usually, I use it as a load balancer.
http://your-server-ip, you will see a page showing these words
Welcome to nginx!