Friday, July 11, 2008

How to Install Apache, MySQL, and PHP in Ubuntu 7.04

MySQL, PHP and Apache are all open source softwares. There's no way that they cannot be available in any Linux OS's.

The following steps will teach you installing apache, php and mysql in Ubuntu 7.04.

I prefer to use Ubuntu 7.04 because of it is easy-to-use, and can access any open source softwares.

Step 1: Install Apache
First, open the terminal in Applications > Accessories.
Then, copy this code:
sudo apt-get install apache2
apache2 means that we are installing Apache version 2.
You might be required to insert your password.


Step 2: Install PHP
sudo apt-get install php5-common php5 libapache2-mod-php5
php5 means that you are installing PHP version 5.
libapache2 is the library PHP needs to connect with Apache.


Step 3: Install MySQL
sudo apt-get install mysql-server mysql-client
I better use the Add/Remove Programs feature of Ubuntu to make sure that i am installing the right program.
Simple go to Applications, and click Add/Remove... at the end of the list.

Step 4: Connect MySQL with PHP
We have already connected PHP and Apache.
The Final step is to connect MySQL with PHP.
sudo apt-get install php5-mysql




To check if Apache is working, open Mozilla Firefox and type
http://localhost/

To check if PHP is working, open Mozilla Firefox and type
http://localhost/phpinfo.php

ENJOY!

Source:
http://www.strdoc.net/ubuntu-7-04-apache-php-mysql-server