Sunday 12 July 2015

LAMP Guide -on Linux Operating System

1. Install Apache

To install Apache you must install the Metapackage apache2. This can be done by searching for and installing in the Software Centre, or by running the following command.
step :
sudo apt-get install apache2

2. Install MySQL

To install MySQL you must install the Metapackage mysql-server. This can be done by searching for and installing in the Software Centre, or by running the following command.
step :
sudo apt-get install mysql-server

3. Install PHP

To install PHP you must install the Metapackages php5 and libapache2-mod-php5. This can be done by searching for and installing in the Software Centre, or by running the following command.
step :
sudo apt-get install php5 libapache2-mod-php5
sudo apt-get install php5-cli
sudo apt-get install php5-mysql


4. Restart Server

Your server should restart Apache automatically after the installation of both MySQL and PHP. If it doesn't, execute this command.
step:
sudo /etc/init.d/apache2 restart

5. Check Apache

Open a web browser and navigate tohttp://localhost/. You should see a message saying It works!


6. Check PHP

php -r 'echo "\n\nYour PHP installation is working fine.\n\n\n";'



This will set up the LAMP on Linux base.