LAMP is an acronym for Linux operating system, Apache web server, MySQL relational database server, and PHP Hypertext Preprocessor a which is a popular general-purpose scripting language that is especially suited to web development at the back end. These technologies enable the hosting of web applications written in PHP with its data stored in MySQL database.

The Linux distribution that we are going to install later in this tutorial is the Ubuntu Operating system which has been discussed in depth here. The Apache web server that we are also going to install has been discussed in depth here. MySQL Server is an open-source relational database management system (RDBMS) with a client-server model which will be used to create and manage databases. And finally, the PHP interpreter will enable the parsing of PHP scripts at the web server so as to enable the development of dynamic and interactive Web pages.  PHP is powerful enough to be at the core of the biggest blogging systems on the web i.e WordPress, Drupal, and Joomla and it is also deep enough to run Facebook the largest social network.

Installing Linux (Ubuntu)

In order to install the LAMP stack, one needs hardware which could be a computer or a cloud instance from cloud providers such as Digital Ocean who will give you $100 in credit over 60 days if you use this refferal  DigitalOcean Referral Badge  link which would be a great cost effective way to get started. Such providers will already provide Ubuntu Images which are easy to install on the cloud instance acquired. Digital Ocean refers to their cloud instance as a "Droplet". If you are installing Ubuntu operating system on a local machine, you need the ubuntu image made available via a removable flash disk drive e.t.c. Read more on installing Ubuntu Operating system here

After Ubuntu operating system has been installed, next up will be the Apache web server.

 

Installing Apache 2

The first step on istalling any software on ubuntu is updating its package lists. This is achievied by typing the following on the terminal. Ensure the user logged into Ubuntu has belongs to the sudo group so that you can run sudo commands.  The Unix command sudo can be broken into to two i.e su and do. su stands for super user while do is an english word for doing. Using sudo command temporarily elavates the currently logged in user to have root priviledges. The temporary root priviledge is availed upon providing a valid password so that doing this for the first time during a session will usually prompt for password. Notice that while you type the password nothing displayed at the terminal.

~$  sudo apt update

 After system package list have been updated, you can then install Apache 2 using the following command:

~$  sudo apt install apache2

 If prompted to confirm Apache installation type Y, then press Enter . Installation will usually take a short while depending on the strength of your internet connection.

Apache 2.4 is then installed in your server. After Apache has been installed on your server, security should now come to your mind. You need firewall configuration to provide a layer of security to your server.

 

Configuring Firewall