Setting Up A Server


  1. Add A New Super User
  2. Disable root From Remote Access
  3. Add FTP Service
  4. Adding Apache
  5. Adding Websites
  6. SSL Certificates For Free
  7. Installing PHP
  8. Installing gcc Compiler

Add A New Super User

This is done for security purposes, hackers will attempt to gain access using the root username, because it is the default and has the most priviledges. So a new user belonging to the group sudo is set up. The code for this, assuming the username is andrewthenerd is:

> adduser andrewthenerd
> usermod -aG sudo andrewthenerd

Disable root From Remote Access

Following on from the previous step, this is done for security purposes. Make sure that the alternative super user is working first, or you might get locked out, not good.

The sshd_config file will need to be edited so that "PermitRootLogin" is changed from yes to no. Once changed the sshd (ssh demon) will need to be restarted.

> sudo vi /etc/ssh/sshd_config
> sudo systemctl restart sshd

Add FTP Service

> sudo apt update
> sudo apt install vsftpd
> sudo systemctl start vsftpd
> sudo systemctl enable vsftpd

Adding Apache

> sudo apt update
> sudo apt upgrade
> sudo reboot
> sudo apt install apache2
> sudo systemctl status apache2

To test that the webserver is running go to a browser on your computer or phone, and type in the ip address of your server (for our examples we will always use If it is running you will get the default apache web page.

Adding Websites


SSL Certificates For Free


Installing PHP


Installing gcc Compiler