LAMP, which stands for Linux, Apache, MySQL and PHP, is a popular open-source web server platform on Linux. The LAMP stack has been enjoying tremendous popularity among website administrators, due to its stability, open-source nature, and excellent community support.

To install LAMP server on Ubuntu, you can use a command line tool called tasksel which allows you to (un)install various tasks, each of which is basically a collection of related packages. So just run tasksel command, and choose "LAMP server" option among a list of available tasks. The rest of installation procedure will be taken care of by the tool.

While tasksel is installed by default on Ubuntu Server, it is not available on vanilla Ubuntu Desktop. So if you are using Ubuntu Desktop, you need to install it first.

$ sudo apt-get install tasksel

Then go ahead and launch tasksel to install LAMP server on your system.

$ sudo tasksel

On tasksel screen, any pre-installed task(s) will have asterisk mark next to its name. All you have to do is check "LAMP server" option, press TAB to move to "OK", and press "ENTER".

Once installation is completed, PHP-enabled Apache HTTP server as well as MySQL server will be up and running on your host, and are set to start automatically upon reboot.

Subscribe to Xmodulo

Do you want to receive Linux FAQs, detailed tutorials and tips published at Xmodulo? Enter your email address below, and we will deliver our Linux posts straight to your email box, for free. Delivery powered by Google Feedburner.

Support Xmodulo

Did you find this tutorial helpful? Then please be generous and support Xmodulo!

Dan Nanni is the founder and also a regular contributor of Xmodulo.com. He is a Linux/FOSS enthusiast who loves to get his hands dirty with his Linux box. He likes to procrastinate when he is supposed to be busy and productive. When he is otherwise free, he likes to watch movies and shop for the coolest gadgets.