LAMP:

LAMP stands for Linux, Apache, MySQL & PHP. It is stack of open source Software used to run PHP websites on the server. Or it is used for development of PHP applications on PC.

Q: How to install LAMP on Ubuntu?

To start with installing LAMP server. We should follow the following steps:

how to install lamp on ubuntu

LINUX

First of All install Linux on PC. You can find article here.

Now we proceed with the remaining three applications.

APACHE

Now we need to install Apache on Linux. We can do this by using following command:

sudo apt-get install apache2

It will ask you for password. Provide password and wait for installation to get completed.

After installing check that apache2 is running? by writing your PC’s IP in browser address bar. It is 127.0.0.1 or localhost for most of the times.

PHP

Now install PHP by using the following command:

sudo apt-get install php5

For running PHP applications with database support we need MySQL.

MySQL

You can install MySQL by using the following command

 sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql

After this we are ready with using LAMP.

If you want to install more packages for PHP then you can see the available packages by following command

apt-cache search php5-

For other applications you just need to replace php5- with your application name.

If you are not familiar with using MySQL in command line. Then there is a GUI named as PHPMyAdmin for MySQL. It is best open source MySQL GUI. Install it by using following command:

sudo apt-get install phpmyadmin

You can test its working by typing following address in your URL:

localhost/phpmyadmin

If it gives Not Found error then follow further steps:

1. Open apache.conf file using following command. ( I am using gedit for editing)

sudo gedit /etc/apache2/apache2.conf

2. Include /etc/phpmyadmin/apache.conf in the end of file

3. Restart apache by using following command:

sudo service apache2 restart

Now we are ready with LAMP server with PHPMyAdmin and start developing.

If you have any troubleshooting tips. Or there is any other suggestions. Please share in comments.

How to Install LAMP on Ubuntu – Linux, Apache, MySQL, PHP on Linux UG ArticlesPHPProgramming,,,,
LAMP: LAMP stands for Linux, Apache, MySQL & PHP. It is stack of open source Software used to run PHP websites on the server. Or it is used for development of PHP applications on PC. Q: How to install LAMP on Ubuntu? To start with installing LAMP server. We should follow the...
<strong>LAMP:</strong> LAMP stands for Linux, Apache, MySQL & PHP. It is stack of open source Software used to run PHP websites on the server. Or it is used for development of PHP applications on PC. <strong>Q: How to install LAMP on Ubuntu?</strong> To start with installing LAMP server. We should follow the following steps: <a href="http://www.grasphub.com/wp-content/uploads/2014/01/8006179_12926471352_large.png"><img class="aligncenter size-full wp-image-2689" alt="how to install lamp on ubuntu" src="http://www.grasphub.com/wp-content/uploads/2014/01/8006179_12926471352_large.png" width="492" height="356" /></a> <strong>LINUX</strong> First of All install Linux on PC. You can find article <a title="Install Ubuntu Linux on your PC" href="http://www.wikihow.com/Install-Ubuntu-Linux" target="_blank">here</a>. Now we proceed with the remaining three applications. <strong>APACHE</strong> Now we need to install Apache on Linux. We can do this by using following command: <pre class="lang:default decode:true">sudo apt-get install apache2</pre> It will ask you for password. Provide password and wait for installation to get completed. After installing check that apache2 is running? by writing your PC's IP in browser address bar. It is 127.0.0.1 or localhost for most of the times. <strong>PHP</strong> Now install PHP by using the following command: <pre class="lang:default decode:true">sudo apt-get install php5</pre> For running PHP applications with database support we need MySQL. <strong>MySQL</strong> You can install MySQL by using the following command <pre class="lang:default decode:true"> sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql</pre> After this we are ready with using LAMP. If you want to install more packages for PHP then you can see the available packages by following command <pre class="lang:default decode:true">apt-cache search php5-</pre> For other applications you just need to replace php5- with your application name. If you are not familiar with using MySQL in command line. Then there is a GUI named as PHPMyAdmin for MySQL. It is best open source MySQL GUI. Install it by using following command: <pre class="lang:default decode:true">sudo apt-get install phpmyadmin</pre> You can test its working by typing following address in your URL: <strong>localhost/phpmyadmin</strong> If it gives <strong>Not Found</strong> error then follow further steps: 1. Open apache.conf file using following command. ( I am using gedit for editing) <pre class="lang:default decode:true">sudo gedit /etc/apache2/apache2.conf</pre> 2. Include /etc/phpmyadmin/apache.conf in the end of file 3. Restart apache by using following command: <pre class="lang:default decode:true">sudo service apache2 restart</pre> Now we are ready with LAMP server with PHPMyAdmin and start developing. If you have any troubleshooting tips. Or there is any other suggestions. Please share in comments.