Tuesday, November 6, 2012

Oracle Data Base 11gR2 Installation in Linux server (64-bit)


Oracle Data Base Download


Download oracle data base latest version from Download.

Pre-Requirements
Required RPM's:-
libaio-devel-0.3.106-5.x86_64.rpm
unixODBC-devel-2.2.11-10.el5.x86_64.rpm
sysstat-7.0.2-3.el5.i386.rpm
libaio-devel-0.3.106-3.2.i386.rpm

Kernal Perameters :-

vi /etc/security/limits.conf
Add the below lins at bottom of the file.
oracle soft nproc 4069
oracle hard nproc 4069
oracle soft nofile 4069
oracle hard nofile 4069

Kernal perameters are also can change while installing database.

Environment Variables :-

export ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_1/
export ORACLE_BASE=/home/oracle/
export ORACLE_SID=orcl
export PATH=/usr/sbin:$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/lib64
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
Operating Systems :-

Linux Redhat version 5 (64-bit)
Installation


1. Navigate to setup directory.
2. Run the installer as "./runInstaller"



3. It will check all the pre requirements to Pass.


4. Uncheck the security updates and Click Next.


5. Select Create and configure a database and Click Next.


6. Select Serer Class and Click Next.


7. Select Single instance database installation and Click Next.


8. Select Typical install and Click Next.


9. Set the Administrative Password and Click Next.


10. Click Next.



11. Click Finish.




12. After sucessful installation and configuration this is the fine screen. Verify SID name and Enterprise Manager URL. Click OK.








Steps to Start the DB :-
1. Navigate to cd $ORACLE_HOME/bin
2. ./lsnrctl start
3. ./dbstart $ORACLE_HOME
4. Execute sqlplus / as sysdba
5. Execute "startup"
Enterprise Manager URL :-
Cheers!!!!!
Kiran Pokuri


Monday, November 5, 2012

Oracle Weblogic Server 11gR1 (10.3.6.0) Installation in Linux (64-Bit).


1. Run Installer as follows




2. Click Next


3. Select the directory path for Middleware and Click Next.


4. Uncheck the Security updates and Click Next.


5. Click on Yes.



6. Select Typical and Click Next


7. Click Next.


8. Click Next





9. Click Done.



10. Oracle Web Logic Server installation is sucessful.


Post your comments for any Quires....!!!!!

Cheers !!!!
Kiran Pokuri

Monday, October 8, 2012

Oracle Access Manager 11g R2 Access SDK



Prerequisites:

- Download OAM 11g R2 Access SDK from OTN and extract ZIP file and set CLASSPATH with all JAR files.
- Register New OAM 10g WebGate
- Add Host Identifier details
- Protect resource(In my case it's Welcome.html)
- Folder Structure needed for Access SDK Client
    - AccessSDKClient
                  - oblix
                        - lib
                            -ObAccessClient
                  - com
                       - spsolutions
                               - OAMAccessSDKTest.ava

- Navigate to C:\Oracle\Middleware\Oracle_IDM1\oam\server\rreg\client\RREG\rreg\output\<<WebGate>> Copy ObAccessClient.xml file and paste in lib folder as mentioned in above step.

Note: Make sure you add protected resource host name in Access SDK host Identifier list.

Code :
package com.spsolutions;

import java.util.*;
import oracle.security.am.asdk.*;

// Class to Check user authorization to a resource.
public class OAMAccessSDKTest {
   public static final String ms_resource = "//oracleiam.spsolutions.com:7777/Welcome.html";
   public static final String ms_protocol = "http";
   public static final String ms_method = "GET";
   public static final String ms_login = "<<userid>>";
   public static final String ms_passwd = "<<password>>";
   public static final String m_configLocation = "C:/OAMASDK";
   public static void main(String argv[]) {
          AccessClient ac = null;
      try {
          ac = AccessClient.createDefaultInstance(m_configLocation, AccessClient.CompatibilityMode.OAM_10G);
System.out.println("Configured Default Instance");
         ResourceRequest rrq = new ResourceRequest(ms_protocol, ms_resource,ms_method);
         System.out.println("Configured Default Instance  1");
         if (rrq.isProtected()) {
            System.out.println("Resource is protected.");
            AuthenticationScheme authnScheme = new AuthenticationScheme(rrq);
            if (authnScheme.isForm()) {
               System.out.println("Form Authentication Scheme.");
               Hashtable creds = new Hashtable();
               creds.put("userid", ms_login);
               creds.put("password", ms_passwd);
               UserSession session = new UserSession(rrq, creds);
               if (session.getStatus() == UserSession.LOGGEDIN)
               {
                  if (session.isAuthorized(rrq)) {
                     System.out.println("User is logged in and authorized for the request at level "       +session.getLevel());
                           String identity = session.getUserIdentity();
                           System.out.println("Identity --> "+identity);
                           // Setting up Session Variables
                           Hashtable sessionAttributes= new Hashtable ();
   sessionAttributes.put("userid", "siva");
   sessionAttributes.put("mobile", "1234567890");
   sessionAttributes.put("email", "siva@abcd.com");
   session.setSessionAttributes(ac, sessionAttributes);
                       
                           // Getting session variables
                          Hashtable attrs = session.getSessionAttributes(ac);
                           System.out.println("Session Attributes" + attrs);

                  } else {
                     System.out.println("User is logged in but NOT authorized");
                  }
               } else {
                  System.out.println("User is NOT logged in");
               }
            } else {
               System.out.println("non-Form Authentication Scheme.");
            }
         } else {
            System.out.println("Resource is NOT protected.");
         }
      }
      catch (AccessException ae) {
         System.out.println("Access Exception: " + ae.getMessage());
      }
      ac.shutdown();
   }
}

Thanks!!!