In this topics i will describe about LAMP and how it work. Also i will describe how to install LAMP in ubuntu.
LAMP stack is a group of open source software used to get web servers up and running. The acronym stands for Linux, Apache, MySQL, and PHP.
We will install it by following steps-
1. Install Apache
To install apache on your machine execute following command in terminal. This code will install apache2 meta-package on your ubuntu operation system.
sudo apt-get install apache2
2. Install MySQL
Run following command in terminal to install MySQL server on your machine. This command will install mysql-server Meta-package on your PC.
sudo apt-get install mysql-server
3. Install PHP
Run following command in terminal to install php on your ubuntu operation system. By following command we install php5 and libapache2-mod-php5.
sudo apt-get install php5 libapache2-mod-php5
4. Restart Server
Execute following code in terminal to restart your Apache server if your server not restart automatically after installing MySQL and PHP.
sudo /etc/init.d/apache2 restart
5. Check Apache
Open your web browser and go to http://localhost. You should see a message saying It works!
6. Check PHP
Run following code in terminal. Or create a php file in var/www directory and open it in web browser via localhost.
php -r 'echo "\n\nYour PHP installation is OK.\n\n\n";'
Congratulations.
You have just installed LAMP Server on your Ubuntu Operation System