Prepare The OS

Log In

If you are not currently logged into your master server, do so with the ssh command.

ssh root@your.master.public.ip.address

Update Ubuntu

In order to make sure that your server is up to date, we need it to check for the latest versions of it's installed packages. We do this by first having it create a list of what's installed. To get a list of the installed packages, run the following command:

sudo apt-get update

This has updated the package listing for the operating system to interact with. This information is cached for use by the Aptitude package manager in the future.

Upgrade Ubuntu

The server can now check for the latest version of the items in the installed packages list. To run this check, enter the below command:

sudo apt-get upgrade

Apt-get will prompt you to review the packages. When asked it you want to continue, enter a capital 'Y'. This step might take several minutes, so kick back while your server does the heavy lifting.

During the update process the OS will appear with a screen like that below. When this appears choose "Install the package maintainers version" to ensure use of the latest version of GRUB.

Once finished let's reboot the server to ensure you're running the latest, greatest version with all current packages.

sudo reboot

Set up your firewall

With the server up to date, we can configure Ubuntu's "uncomplicated firewall" (UFW). We'll use this to turn off all ports on the server except for the specific ones we'll need. This step is a *best practice* for basic server security. Let's start locking down the server by enabling UFW

sudo ufw enable

You will receive a note this may disrupt SSH connections. Don't worry, we will open the port for SSH (22) in a moment. When prompted "Proceed with operation (y|n)", press y to continue.

Next we open the ports required for HTTP, HTTPS, and SSH.

sudo ufw allow 22
sudo ufw allow 80 
sudo ufw allow 443

Now the firewall will only listen for connections on the ports we have specified. These ports apply to the SSH, HTTP, and HTTPS protocols.

With the Operating System updated and secured, you are ready to move into installing the web server packages that allow WordPress to run.