A LAMP stack is a Apache web server that runs on Linux and has PHP and MySQL capabilities.
Firstly, we need to update the package lists:
sudo apt-get updateInstalling the Apache web server:
sudo apt-get install apache2Testing the web server:
Find the local ip address of the server:
ifconfigNow when you visit this ip address in a browser you should see a page that looks something like this:
sudo apt-get install php libapache2-mod-php php-mcrypt php-mysqlInstalling MySQL:
sudo apt-get install mysql-serverSetting up MySQL:
When installing mysql you will be asked for a root password for the MySQL-server.