Verify that Apache was installed without errors by accessing it from your local browser. Enter hostname -I to obtain your IP address for the server and navigate to http://SERVER_IP/.

Step 2: Install MySQL

Enter the following into the shell prompt.

sudo apt-get install mysql-server -y

This will install the MariaDB database server (a fork of MySQL). You will be asked to enter a password for the MySQL root user, so go ahead and do that. Then, run

sudo /usr/bin/mysql_secure_installation. Press "y".

Depending on the level of security, you'll have the option to adjust the password complexity. For now, we'll be using the strong security preset. For any of the following options, press "y" and continue.

Step 3: Install PHP

The last thing we'll be doing in this article is installing PHP. Install PHP: