How to install LAMP on Ubuntu (Linux, Apache, MySQL and PHP) in one command

Lamp stands for Linux, Apache, MySQL and PHP. These tools are very common for running many websites such as WordPress, Drupal, Joomla, Collabtive...etc. In Ubuntu we can easily install Apache2, MySQL and PHP with one simple command. In later articles we will later setup some of these open source web applications and use the complete LAMP server. If you are interested in following some of theses tutorials please subscribe to the RSS feed.

Since by default the Ubuntu server does not have a GUI we will install LAMP with the command line. If you do have a GUI installed, you can open a terminal and issue the following commands. This goes for your desktop as well. Lets get started.

sudo apt-get install lamp-server^





sudo apt-get install lamp-server^



Enter your password



Enter Your Password



Enter “Y” and hit Enter



Enter Y to start installing LAMP (Apache, MySQL, PHP)



You should see your server downloading the needed Lamp Packages.

Create a secure MySQL password



Create a password for MySQL root user



Enter your new MySQL password one more time.


Enter your password one more time to confirm it


If you enjoyed this post, please share it on your favorite social network by clicking on the “Share / Save” bar below.