Showing posts with label Installing & Configuring Apache 2.2 64bit on Solaris x86 Box. Show all posts
Showing posts with label Installing & Configuring Apache 2.2 64bit on Solaris x86 Box. Show all posts

Sunday 30 November 2014

Installing & Configuring Apache 2.2 (64bit) on Solaris x86-64 Box

This post is divided into 3 sections: Installation, Configuration & Verification. 



So let's start the process.........


Installing Apache22-64bit-

  1. To install apache22, we need the source code & than need to build it. This will generate the binaries.
  2. Download the source code from http://httpd.apache.org/download.cgi#apache22 to your Solaris Sparc box.
  3. Now we need to 'export' some settings, i.e. per-requisites before we start the build process:
    1. export LD_LIBRARY_PATH=/usr/sfw/lib/amd64:/usr/local/lib/amd64
    2. export PATH=/usr/sfw/bin:/usr/ccs/bin:/usr/local/ccs/bin:/usr/local/bin:$PATH
    3. # if you want it 64 bits:
      1. export CFLAGS=”-m64″
    4. # if you want it 32 bits:
      1. # export CFLAGS=”-m32″
    5. export LDFLAGS=”-L/usr/sfw/lib/amd64″
    6.  
      4.  Unzip the downloaded apache22 source code.
      5.  Change the directory, move to the unzipped folder.
      6.  Now we need to configure the environment for building the source code, for this it is 
           required to execute the 'configure' script present in the directory.

           For eg: /scratch/ckukreja/apache22 is the directory where you have unzipped the 
                       source code
                       
                       bash$>ls -ltr configure

      7.  Execute the 'configure'  script.
           ./configure --with-included-apr --enable-so --prefix=/scratch/ckukreja/apache64



      8. Now we need to build & install the binaries. Do the following:
    • make



    • make install

     9. Now go to the directory where you have install apache22
    • Move to bin folder and execute the 'file' command on httpd executable file.
                 bash$> cd /home/ckukreja/apache22/bin 
                 bash$> file httpd
    • 'file httpd' - It's output will show you the type of file is it. Here it should show 64bit, if not than the binaries are of 32bit. Check the steps again.
    


Configure Apache22 on Solaris Sparc Box:

 As you have installed the apache22 on your Solaris Machine. Now it is required to configure it before we start the server.
  1. Go to the apache22 installation directory. Move to conf folder.
         bash$> cd /home/ckukreja/apache22/conf  
     2. Open httpd.conf file to edit it. 

          bash$> vi httpd.conf
    • Change the port from '80' to the one you want. Like we use '8080'.
    • By default username & group are configured as 'daemon'. Change them to the one you are logged in with.
    • Save the changes & close the file.

      3. Now come out of the conf folder & change your directory to bin folder.
          
         bash$>cd /scratch/ckukreja/apache64/bin

      4. Execute the apachectl executable. It will start the httpd server process.
    • ./apachectl -k  start

Verify the installation & configuration steps:

Try to access the default resource present on apache22 server like index.html.
Syntax: http://<hostname>:<port>/index.html
Eg: http://hostname:8080/index.html

It will display the "It Works!!!"



So guys you are done with the Installation & Configuration of Apache22-64bit on your Solaris x86-64 Machine..........!!!!!!!!!!!!!! :-)


Enjoy :-)