Install and configure apache2 php5 mysql phpmyadmin in ubuntu 8.04/8.10

Posted on November 22, 2008

1.First please use command apt-get to install these packages.

sudo apt-get update
sudo apt-get install apache2-mpm-prefork
sudo apt-get install mysql-server
sudo apt-get install libapache2-mod-php5
sudo apt-get install php5-mysql
sudo apt-get install php5-gd
sudo apt-get install php5-cli
sudo apt-get install phpmyadmin

Note:During the installation of mysql,system will prompt you to input the root password for mysql database.And during the installation of phpmyadmin,a window will jump out,pls select “Apache 2″ then select “ok”

2.Modify /etc/php5/apache2/php.ini to let php5 support mysql.

uncomment line “;extension=mysql.so “.

extension=mysql.so

Then restart the Apache service:

sudo service restart apache2

3.Test if the php5 and apache 2  works

Create file /var/www/test.php and input the following line to it.

<?php phpinfo();?>

Then open your Firefox,input “http://127.0.0.1/test.php” see if it works

4.Test if the mysql and phpmyadmin works

Open your Firefox ,input “http://127.0.0.1/phpmyadmin”,Will prompt you to enter the login information.(username is root,and the password you set during the installation your mysql).

Popularity: 6% [?]

» Filed Under Linux

Comments

Leave a Reply