Installing Apache 2.2.4 in UNIX

You can carry out a basic standalone installation of Apache 2.2.4 on UNIX using the below mentioned steps. Required steps are written and can be understood easily.

The below steps are taken from official Apache Org site.

Step 1) Getting the Apache 2.2.4 dumps

You can get the software dump for Apache from official site. You can download the required dump from this page.

Step 2) Once you get the dump, it will be in the form of zip file (.gz). You can unzip the file dump using following command

gunzip httpd-2.2.4.tar.gz

After this you will get a .tar file. You need to extract this and get all the required files. You can do the same using following command

tar -xvf httpd-2.2.4.tar

Step 3) Once you extract all the files, next you need to configure the source tree.This is done using the script configure included in the root directory of the dump.

To configure the source tree using all the default options, simply type ./configure. To change the default options, configure accepts a variety of variables and command line options.

The most important option is the location –prefix where the Apache HTTP Server is to be installed later, because Apache HTTPd has to be configured for this location to work correctly. More fine-tuned control of the location of files is possible with additional configure options.

Use the below step to configure Apache source tree. To run the below command you have to be in the dump directory of apache.

./configure –prefix=/u01/app/oracle/product/apache –enable-rewrite=shared –enable-speling=shared

Step 4) Build

Now you can build the various parts which form the Apache HTTPd package by simply running the command:

Below command also needs to be run from dump directory.

[oracle@ocvmrh2023 httpd-2.2.4]$ make

Step 5) Now it’s time to install the package under the configured installation directory by running:

[oracle@ocvmrh2023 httpd-2.2.4]$ make install

Step 6) configure Apache.

We can do the simple configuration by just setting the correct port number. By default it will have port 80. You need to set some other port, which is unused. For my installation I am setting the port 7771. The port number is to be set in httpd.conf file in [APAHCE_HOME dir]/conf directory.

Once you do that bounce the apache using following command. The below script is present in [APACHE_HOME dir]/bin

[oracle@ocvmrh2023 bin]$ ./apachectl stop
httpd (no pid file) not running
[oracle@ocvmrh2023 bin]$ ./apachectl start
[oracle@ocvmrh2023 bin]$

You can confirm the installation by accessing the server using the below URL

http://(hostname : port)/

In my case it will be

You can see a text “It works!“. This confirms that your apache installation went fine.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s