Ads 468x60px

Pages

Subscribe:

Monday, July 18, 2011

Compiling and installing Apache HTTP

Compiling and installing httpd-2.0.64 (Apache http) on Solaris 10


On solaris 10 their is already apached installed with OS and it can be controlled by SMF . Howerver , I had to download and install Apache http to configure it under VCS (Becuase I dint got any light weight Application to practice Cluster configuration) Below are the setps I followed to install Apache http . As this is the first time I ever configure http , I used some web resources to do this .

1.Download the installable from Apache http://httpd.apache.org/download.cgi select one stable release (I choosed 5.0.64)

2.ftp the file in gz format to your server where apache needs to be installed .

3.gunzip and untar the file httpd-2.0.64.tar.gz to some temporary directory (I am using /tmp)
#gunzip /tmp/httpd-2.0.64.tar.gz
#tar -xvf /tmp/httpd-2.0.64.tar


You will be left out with the directory /tmp/httpd-2.0.64.

4.Changed Directory to /tmp/httpd-2.0.64 where you will find "configure" file.

#cd /tmp/httpd-2.0.64
5.Below is the command line I used to configure apache with "/apachevol" as root directory.

#export CC=/usr/sfw/bin/gcc

#./configure --prefix="/apachevol"

If solaris path /usr/sfw/bin is not under PATH variable so I just used CC to specify the C compiler we use this can be changed accourding to the installation directory of your gcc. And that is done .... It will display a long long list of lines showing status . If it doesnt display any error then you are lucky to go through first time .

6.Here before proceeding you need to check if you have 'make' command in you server .(Generally it is installed under /usr/ccs/bin ) . You can check if the directory in which 'make' executable is in your path. ( I used the command 'whereis make' and 'which make' which throughed as error showing that no make in ... somepaths..) If you see that /usr/css/bin is not under PATH then declare it before proceeding to compile apache you just configured .

#export PATH=$PATH:/usr/css/bin

7. After you set your PATH variable use the command make (Dont forget you should be uder the path from where you configured apache .. i.e., for me it is /tmp/httpd-2.0.64 )

#make

It will display a long list of compile messages and at the end you are ready to install the apache .

8.Use the command 'make install' this completes your apache installation .

#make install

9. Prior to starting http you can make further configuration changes by editing the file httpd.conf under "apacherootdirectory"/conf . Make sure you define the existing user and group for the variables User and Group in httpd.conf file .

10.Now you are all set to start apache using the command "apachectl start" under the "apacherootdirecotry"/bin

1 comments:

valdir dias said...

I Coldn't do it , show me some errors and can't do the make install command .
do you have this installation there yet ?
can you help me ?

Post a Comment