Saturday, 25 October 2014

Post Data Restoration and Long URL handling - OTD Webgate11g

Post Data Restoration and Long URL handling:


This feature is available in newer OTD Webgate 11g R2PS2 release dated '06/06/2014'.
While in the older OTD R2PS2 release dated '12-dec-2103', this feature is missing.

So kindly upgrade the webgate to the newer release.

To Download follow below link:
https://edelivery.oracle.com/EPD/Download/get_form?egroup_aru_number=15364661


  • Open the above link & download the Part Number-  V46017-01


Note
  1. Although it is mentioned in the download setup 'Solaris SPARC 64bit', but it is generic installer. You can use it for all platforms.
  2. Currently this new OTD Webgate 11g R2PS2 is not available on OTN.




Enjoy :-)

Monday, 13 October 2014

Installing & Configuring Apache 2.4 (64bit) on Linux Machine

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



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

Installing Apache 2.4 (64bit) on Linux Machine :

  1. To install apache 2.4, 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#apache24 to your Linux 64bit box.
  3. Pre-requisites:
    1. Download & configure Apache Portable Runtime Libraries.
    2. Download, Install & Configure PCRE (Perl Compatible Regular Expressions).
  4.  Download APR & APR-Util:
    1. bash$> wget http://apache.tradebit.com/pub//apr/apr-1.5.1.tar.gz
      bash$> wget http://apache.tradebit.com/pub//apr/apr-util-1.5.4.tar.gz
    1. Untar both the archives.
                  bash$> gtar -xvzf apr-1.5.1.tar.gz
         bash$> gtar -xvzf apr-util-1.5.4.tar.gz

      4.  Now we need to copy the files from apr & apr-util unzipped folder to the apache 
           downloaded source code folder under "srclib".

               bash$> mv apr-1.5.1/* /scratch/ckukreja/apache24/srclib/apr
               bash$> mv apr-util-1.5.4/* /scratch/ckukreja/apache24/srclib/apr-util

      5.  Download the PCRE from http://sourceforge.net/projects/pcre/files/pcre/8.36/ 
    1. Install the pcre. 
          bash$> wget http://sourceforge.net/projects/pcre/files/pcre/8.36/pcre-8.36.tar.gz/download

              2. Configure it.

           bash$> gtar -xvzf pcre-8.36.tar.gz
           bash$> cd pcre-8.36
           bash$> ./configure --prefix=/scratch/ckukreja/pcre

              3. Do make & make install 
            bash$> make
            bash$> make install        
          
      6.  Now we need to configure the environment for building the apache2.4 source code, for this 
           it is required to execute the 'configure' script present in the directory.

           For eg: /scratch/ckukreja/apache24/httpd2.4.10 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 --with-pcre=/scratch/ckukreja/pcre/ --prefix=/scratch/ckukreja/myapache

      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 "myapache"
    • Move to bin folder and execute the 'file' command on httpd executable file.
                 bash$> cd /home/ckukreja/myapache/bin 
                 bash$> file httpd
httpd: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), not stripped
    • '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 Apache 2.4 on Linux Box:

 As you have installed the apache 2.4 on your Linux Machine. Now it is required to configure it before we start the server.
  1. Go to the "myapache" installation directory. Move to conf folder.
         bash$> cd /scratch/ckukreja/myapache/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 '8880'.
    • 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/myapache/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 apache 2.4 server like index.html.
Syntax: http://<hostname>:<port>/index.html
Eg: http://slc0010:8880/index.html

It will display the "It Works!!!"


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

Wednesday, 8 October 2014

[Webgate]: Configure ProxyPassMatch Directive -> Required for Apache/OHS Internal Redirect Calls

Potential Problem :

When webgate identifies an error/exception (may be reported by OAM) , in this
case webgate fires an internal redirect request for "/oberr.cgi" & this
invokes an error handler.
This error handler is defined in the webgate.conf file.
<Location "/oberr.cgi">
SetHandler obwebgateerr
</Location>

But when the resource webgate is the proxy. In this case if webgate
identifies error/exception, it fires an internal redirect request. But the
error handler "obwebgateerr" is not invoked.


Potential Reason: 

When apache sends the internal redirect request in that case it sets "proxy-server" handler by itself.
Due to which the handler defined for "/oberr.cgi" is not set as already an
handler is set. This causes the request to be proxied to the backend server &
causes problem.


Solution:

It is required to set a "ProxyPassMatch" directive before the "ProxyPass"
directive in the conf file.
By setting this directive, it will not proxy for the "/oberr.cgi" request to
the backend server rather it will be served by the webgate itself.


Configuration to do:

1) Add the following directive in the conf file. Restart the Web Server:

ProxyPassMatch ^/oberr.cgi !

Syntax:
ProxyPassMatch [regex] !

The ! directive is useful in situations where you don't want to reverse-proxy.

Eg:

ProxyPassMatch ^/oberr.cgi !
ProxyPass / http://something.com/AuthenticationService/
ProxyPassReverse / http://something.com/AuthenticationService/


Enjoy :-)

Thursday, 2 October 2014

Creating an Oracle HTTP Server Instance

Let's Start the process.....


1) Go to the OHS Installed Directory.....

    bash$> cd $OHS_HOME


2) Move to opmn -> bin folder

    bash$> pwd
     bash$> /scratch/ckukreja/OHS/Oracle_WT1/
     bash$> cd opmn/bin


3) Now we will first create instance using the opmnctl executable.

bash$> ./opmnctl createinstance -oracleInstance /scratch/ckukreja/OHS/Oracle_WT1/instances/my_inst    -adminRegistration OFF

 Creating Oracle Instance directories...Done
 Recording OPMN ports reservations...Done
 Bootstrapping OPMN configuration files...Done
 Instantiating opmnctl for direct usage...Done
 Skipping instance registration
 Command succeeded.

Note: Here we have created a new instance name 'newInstance'. Also we have 'OFF' the 
         adminRegistration.

bash$> ls  /scratch/ckukreja/OHS/Oracle_WT1/instances/my_inst
auditlogs  bin  config  diagnostics  tmp


4) We have successfully created the instance, now it's time to create OHS Component.

 bash$> ./opmnctl createcomponent -componentType OHS -componentName myohs -oracleInstance 
                /scratch/ckukreja/OHS/Oracle_WT1/instances/my_inst

 Creating empty component directories...Done
 Provisioning OHS files for myohs
 Copying OHS files from ORACLE_HOME to ORACLE_INSTANCE locations
 Customizing httpd.conf
 Adding component's process control to OPMN...Done
 Skipping myohs component registration.
 Command succeeded.

Note: We have created 'myohs' OHS component with our instance 'my_inst'.

bash$> ls  /scratch/ckukreja/OHS/Oracle_WT1/instances/my_inst
auditlogs  bin  config  diagnostics  OHS  tmp


5) Now its time to start the OHS.

bash$> cd /scratch/ckukreja/OHS/Oracle_WT1/instances/my_inst/bin
bash$> ./opmnctl startall

bash$> ./opmnctl status
Processes in Instance: my_inst
 ---------------------------------+--------------------+---------+---------
 ias-component                    | process-type       |     pid | status
 ---------------------------------+--------------------+---------+---------
 myohs                           | OHS                |    7777 | Alive


We are done with the OHS Instance creation process...........!!!!!!!!!!!!!!!!


Enjoy :-)

Saturday, 27 September 2014

vncserver: couldn’t find “xauth” on your PATH

Problem:

 While starting a vncserver session on linux machine, if you get the following error:

bash$> vncserver :01
vncserver: couldn’t find “xauth” on your PATH

Solution:

bash$> export PATH=$PATH:/usr/X/bin:/usr/X11/bin



Enjoy.............. :)

Installing & Configuring Apache 2.2 64bit on Solaris Sparc 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/sparcv9:/usr/local/lib/sparcv9
      export PATH=/usr/sfw/bin:/usr/ccs/bin:/usr/local/ccs/bin:/usr/local/bin:$PATH

      # if you want it 64 bits:
      export CFLAGS=”-m64″
      # if you want it 32 bits:
      # export CFLAGS=”-m32″
      export LDFLAGS=”-L/usr/sfw/lib/sparcv9″

       
      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: /home/ckukreja/sr_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=/home/ckukreja/apache22

      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 '8880'.
    • 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 /home.ckukreja/apache22/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://slc0010:8880/index.html

It will display the "It Works!!!"


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


Enjoy :-)




Friday, 26 September 2014

Install & Configure Apache 2.2 (64bit) on AIX Machine

Install Apache 2.2 (64bit) on AIX Machine:

Follow the steps:

  1. To install apache22, we need the source code & requires to build it. This will generate the binaries.
  2. Download the source code from http://httpd.apache.org/download.cgi#apache22 to your AIX64 box.
  3. Now we need to export setting, that is per-requisties before we start the build process:
    1.  export OBJECT_MODE=64
     4. Untar the source zip. Change the directory to unzipped folder
     
     5. Execute the configure script present in the folder as follows:

LDFLAGS="-maix64" LD=gcc CFLAGS="-maix64" ./configure --prefix=/scratch/anikukum/chalja --enable-so --with-included-apr

 Note:
  • Here we are using  'gcc' as complier, you can use other like 'xlc' etc.
  • The flags CFLAGS & LDFLAGS are ensuring the 64 bit compilation to be done.
  • --with-included-apr <this ensures that the APR, APR-Util library will be included>
  • --prefix <here you need to provide the path where you want to install the apache22>
     6. Compile & install.
  • make - it will compile the source code
  • make install - this will install the binaries & other files at the location provided in 'prefix'.
     7. Now go to the directory where you have install apache22
  • Move to bin folder and execute the 'file' command on httpd executable file.
  • 'file httpd' - It's output will show you the type of file is it. Here it should show 64bit, if not than you have missed some step.

Configure Apache22 on AIX:

 As you have installed the apache22 on your AIX Machine. Now it is required to configure it before we run the server.


  1. Go to the apache22 installation directory. Move to conf folder.
  2. Open httpd.conf file to edit it.
  • Change the port from '80' to the one you want. Like we use '8889'.
  • By default username & group are configured as 'daemon'. Change them to the one you are logged in.
  • Save the changes & close the file.
      3. Now come out of the conf folder & change your directory to bin folder.
      4. Execute the apachetl exe file. It will start the httpd server process.
  • ./apachetl -k  start

Verify the installation & configuration:

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



So guys you are done with the Installation & Configuration of APache22-64bit on your AIX Machine.


Enjoy :-)