LAMP is an acronym for a solution stack of free, open source software, referring to the first letters of Linux (operating system), Apache HTTP Server, MySQL (database software) and PHP (or sometimes Perl or Python), principal components to build a viable general purpose web serv


Install Apache

sudo apt-get install apache2

Testing HTTP Server by open a web browser and enter http://localhost


Install PHP5
sudo apt-get install php5 libapache2-mod-php5

Stop/Restart Apache
sudo /etc/init.d/apache2 restart

Test the installation
sudo gedit /var/www/testphp.php

Insert this following line into testphp.php file.
<?php phpinfo(); ?>

Save this new file.
Open a web browser and enter http://localhost/testphp.php
Be sure to remove the file afterwards, as it may pose a security risk.
sudo rm /var/www/testphp.php


Install MySQL Server
sudo apt-get install mysql-server

MySQL initially only allows connections from the localhost ( We’ll need to remove that restriction if you wish to make it accessible to everyone on the internet. Open the file /etc/mysql/my.cnf
gksudo gedit /etc/mysql/my.cnf

Find the line bind-address = and comment it out then save the file.
MySQL comes with no root password as default. This is a huge security risk. You’ll need to set one. So that the local computer gets root access as well, you’ll need to set a password for that too. The local-machine-name is the name of the computer you’re working on.
mysqladmin -u root password newpassword 
mysqladmin -h root@local-machine-name -u root -p password newpassword 
sudo /etc/init.d/mysql restart

MySQL Administrator

Install MySQL Administrator
sudo apt-get install mysql-admin

Refresh Gnome Panel
killall gnome-panel

Run MySQL Administrator
Applications -> System Tools -> MySQL Administrator

MySQL for Apache HTTP Server

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

To get PHP to work with MySQL, open the php.ini file
gksudo gedit /etc/php5/apache2/php.ini

You’ll need to uncomment the “;” line so that it looks like this

Restart Apache
sudo /etc/init.d/apache2 restart

Well done!

Testing Phpmyadmin

To make sure everything installed correctly we will now test Phpmyadmin to ensure it is working properly.

1. Open up any web browser and then enter the following into the web address:
If Phpmyadmin is not working try to create a symlink otherwise:
sudo ln -s /usr/share/phpmyadmin /var/www/phpmyadmin


Popular posts from this blog

Pfsense 2.0.1 Dual Wan Configuration

Installing Nagios Core on Amazon Linux Instance

Updating Routing table for VPC Peering Connection