Install Apache, MySQL, PHP and phpMyAdmin On Ubuntu

Posted on the December 31st, 2010 at 3:21 pm by Larkins Dsouza

In this guide I will show you how to install a LAMP system. LAMP stands for Linux, Apache, MySQL, PHP. Open up the Terminal (Applications > Accessories > Terminal).  Copy/Paste the following line of code into Terminal and then press enter:

1) Install Apache
sudo apt-get install apache2

Test if Apache works Open up any web browser and then enter the following into the web address: http://localhost/

2) Install PHP
sudo apt-get install php5 libapache2-mod-php5
In order for PHP to work and be compatible with Apache we must restart it. Type the following code in Terminal to do this: sudo /etc/init.d/apache2 restart

4) Install MySQL
sudo apt-get install mysql-server

5) Install phpMyAdmin
sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin

Now just restart Apache and you are all set!
sudo /etc/init.d/apache2 restart

TROUBLESHOOTING:
Sometimes phpMyAdmin simply doesn’t work. Don’t need to panic simply type:
sudo ln -s /usr/share/phpmyadmin /var/www/

Copying files to /var/www use code: gksudo nautilus

gksudo nautilus

Leave a Reply




XHTML::
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>