Tuesday, 29 December 2015

Install LAMP on Linux

Following is the step by step procedure to install Apache MySQL and PHP on Linux.Together these are called LAMP.

First of all you need to make sure that you are logged in as the root user.

#apt-get install update #apt-get install apache2

Install php using following command.

#apt-get install php5 libapache2-mod-php5

After installation, you need to make certain changes as follows.

#gedit /var/www/html/phpinfo.php

Next step is to install mysql-server.

#apt-get install mysql-server

During the installation there will be several prompts.

set the password for MYSQL “root” user.
#apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin

select the server as apache2 when prompted.
again there will be prompts for password ; make it the same as before
There are few changes to make in the configuration file apache2.conf

#echo -e “\nInclude /etc/phpmyadmin/apache.conf” >>/etc/apache2/apache2.conf

And you are all set to create your php website.

No comments:

Post a Comment