First, let me introduce LAMP Server to you. LAMP stands for Linux Apache MySql PERL/PHP. So, keep it in your mind that for installing the LAMP server, you must have Linux distribution such as Ubuntu and Debian in your pc. You also get these flavours in XAMPP (Linux version), what I showed already in my blog. But LAMP server will give you more efficiency and flexibility. I will guide you installing LAMP Server on Ubuntu in command line..
Well, before installing, type following command in terminal for necessary packages . .
sudo apt-get update
Now, first step is to install PHP 5 with Apache web server
sudo apt-get install apache2 php5 libapache2-mod-php5
Once installing is finished, please restart Apache server
sudo /etc/init.d/apache2 restart
Apache configuration file is located at /etc/apache2 /apache2.conf and web folder is /var/www. To make sure that PHP is installed and running properly. type following line..
sudo echo '<?php phpinfo(); ?>' > /var/www/test.php
Then, open a browser and type http://localhost/test.php or http://IP_address/test.php and it will show you configuration and default setting.
Second step is to install MySql Databse server.
sudo apt-get install mysql-server mysql-client php5-mysql
After finishing the installation, it will prompt for password. You can change it’s password later on.
Third step is to install phpmyadmin. Basically , phpMyAdmin is a free software tool written in PHP intended to handle the administration of MySQL over the World Wide Web.
sudo apt-get install phpmyadmin
After finishing the installation, it will again prompt password two times. first one is for accessing Mysql and second one is for accessing phpMyadmin. phpMyadmin configuration file is located at /etc/phpmyadmin. Another thing is that to install phpMyadmin properly under apache server, you have to include following line to /etc/apache2/apache2.conf
sudo nano /etc/apache2/apache2.conf
then include following line..
Finally, save and close it and restart the apache server again. Point your browser to : http://localhost/phpmyadmin or http://IP_adress/phpmyadin. DONE…Your LAMP Server is ready for cooking web application..