Wednesday, April 15, 2009

Installing Apache on Ubuntu

Ubuntu is one of the Linux distributions that grew out of the Debian Linux distribution. Unlike the RedHat-based distributions (RedHat, Fedora, CentOS and Mandrake), installation under Ubuntu does not use the "yum" command. Instead it uses the "apt-get" command. Variation also exists between the package names under Ubuntu and those of the RedHat-based distributions.

Installing the Apache web server under Ubuntu uses the following command:

#apt-get install apache2

As you may have noticed, the package name for the Apache web server is "apache2" instead of "httpd" under RedHat-based distributions.

You can also install the accompanying PHP scripting engine by issuing the following commands:

#apt-get install php5
#apt-get install libapache2-mod-php5

The home directory of the Apache web server is located in "/var/www" directory instead of "/var/www/html" directory under RedHat-based distributions.

I've tested the above procedure under Ubuntu 8.10.

No comments: