This is actually a very basic guide… Actually For starters, We will try to Install LAMP in Ubuntu 14.04
LAMP is basically short for Linux, Apache, MySQL and PHP.
We would try to install LAMP in Ubuntu 14.04. As you all know Ubuntu 14.04 is the latest version of Ubuntu released some days ago.
The 1st question arises here is What is LAMP?
LAMP is a software bundle which includes Linux, Apache, MySQL & PHP. To read more about LAMP
So LAMP contains,
We already have Linux covered as we are installing it on Ubuntu 14.04.
Let’s start Installing LAMP in Ubuntu 14.04
Run these below commands first. (We assume you have a clean Ubuntu 14.04)
sudo apt-get update && apt-get upgrade
The above command will downloads latest package lists from the repositories & the later one will upgrade the packages.
How to Install LAMP in Ubuntu 14.04 :
Apache is an open source (free) software which runs over half of the web servers across the globe.
sudo apt-get install apache2
The above command will Install Apache Web Server by itself. You don’t have to do anything.
After the installation is complete type the following command in the terminal, It will show the IP of server.
The output of the command will be something like this
Now enter the IP of the Server in any Browser & you should see something like this..
Now we will move to our next step…
World’s second most used open source “Relational Database Managment System” (RDBMS). To learn more see this link
sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
During the Installation of MySQL it will ask for the root password. (Please make sure you enter a secure password & note it down somewhere because without it you won’t be able to access your database.)
Now we will start installing PHP.
Very famous Server Side Scripting language, Especially designed for Web Development but can be used as general purpose. For more info visit
sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt
Congratulations! You have successfully installed LAMP in Ubuntu 14.04!
Now the next step is to verify that the PHP is running or not. For this we will create an info.php file & try to open it from the browser.
sudo nano /var/www/html/info.php
This will create a empty file in /var/www/html directory (By Default in Ubuntu 14.04 /var/www/html is the Document Root), Now paste the following line in the newly created info.php file.
Save the file & restart the apache so we can view info.php in the browser. (This file will only show you the PHP Info. & make sure you delete this file after testing!)
sudo service apache2 restart
Goto the browser & enter the IP & name of the file. In our case which is http://192.168.89.129/info.php
& you should see a page like this.
OK folks, That is all for today! We successfully installed LAMP in Ubuntu 14.04.
Keep visiting for more How To’s.