Friday, December 12, 2008

LAMP in Ubuntu Desktop

Desktop version of Ubuntu by default doesn't include "AMP" (Apache, MySQL, php), so you have to install them yourself. And I notice that these packages can't use package manager to install. So the only way is use the command in terminal.


1. Apache

Install Apache version 2

sudo apt-get install apache2


Install php as module

sudo apt-get install libapache2-mod-php5


To test the Apache, just open your Firefox, go to http://localhost

if you saw

It works!

meaning... it works...


2. MySQL

Install MySQL server (you will ask to enter a password for the root user during the installation)

sudo apt-get install mysql-server

Install MySQL Administrator (GUI Administrator tools)

sudo apt-get install mysql-admin


Install the php support on MySQL

sudo apt-get install php5-mysql


To test the MySQL, open the Applications->Programming->MySQL Administrator. Server Host is localhost, port is 3306, username is root and your password and click connect. If success you will see this.


3. phpMyAdmin

phpMyAdmin is a powerful web-base MySQL administrator interface.

Download the program from here

http://www.phpmyadmin.net/home_page/downloads.php

The extract it (for English version)

tar -xzvf phpMyAdmin-3.1.1-english.tar.gz


Move it to WWW root folder

sudo mv phpMyAdmin-3.1.1-english /var/www


mv phpMyAdmin-3.1.1-english phpMyAdmin

To test it, open the Firefox and go to http://localhost/phpMyAdmin and you will see something like this

No comments:

Post a Comment