Friday, April 13, 2012

WebLogic Server (WLS) Installation

I was going to this blog entry under my OID series but it occured to me that it made more sense to do a generic installation blog post instead given WLS is used by OID, OEM and many other components with which I've used and the only difference would be the WLS version used. The installation process is the same for 10.3.4 to 10.3.6. I can't vouch for other versions since I've not used prior versions and 12c is a bit different. So without further ado here is the install process, first the usual command line silent installation and then the GUI method.

Common Step - JDK Installation

1. Install a certified version of JDK to use. In the case of WLS 10.3.5 this would be JDK 1.6.0_24

For Oracle JRocket (required a GUI):

chmod +x jrockit-jdk1.6.0_24-R28.1.3-4.0.1-linux-x64.bin
./jrockit-jdk1.6.0_24-R28.1.3-4.0.1-linux-x64.bin

For Sun JDK:
chmod +x jdk-6u24-linux-x64.bin
./jdk-6u24-linux-x64.bin

2. I like to setup the environment for the installation process, specfiically calling out the location of the Java version to use. This would be required if you have multiple Java installations and you want to ensure the correct location/version is used.

export JAVA_HOME=/u01/app/oracle/jdk
export PATH=$JAVA_HOME/bin:$PATH

Method 1: Command Line Silent Installation

1. Build or edit the "silent.xml" file as below:

<?xml version="1.0" encoding="UTF-8"?>
<!-- Silent installer option -mode=silent -silent_xml=/u01/app/stage/silent.xml -->
<!-- Specify values for each data-value name as follows:
BEAHOME - Complete pathname to the Middleware Home directory that will contain this installation.
WLS_INSTALL_DIR - Complete pathname to the product installation directory in which to install WebLogic Server.
COMPONENT_PATHS - Components and subcomponents to be installed. To install multiple components, separate the components with a bar (|). To install subcomponents, specify a component/subcomponent combination. For example, to install Core Application Server, use "WebLogic Server/Core Application Server".
INSTALL_NODE_MANAGER_SERVICE - Install Node Manager as a Windows service. The default is "no". Requires Administrator privileges.
NODEMGR_PORT - Node Manager listen port number. If none specified, installer uses default port 5556.
INSTALL_NODE_MANAGER_SERVICE - must be set to "yes".
INSTALL_SHORTCUT_IN_ALL_USERS_FOLDER - The Windows Start menu folder in which you want the Start menu shortcuts created. The user performing the installation must have Administrator privileges to install the shortcuts in the All Users folder. Possible values: true/yes The shortcuts are created in the All Users folder (default) false/no The shortcuts are created in the local user's folder
BEA_BUNDLED_JVMS - Option to select BEA bundled JVMS (for e.g. either jrockit_160_05 or jdk160_05 for Windows and Linux platforms). The default value is all BEA bundled JVMs for selected platform.
LOCAL_JVMS - Option to select supported JVM, which is already installed. Note: The presence of either(BEA_BUNDLED_JVMS or LOCAL_JVMS) or both of these tokens negates any default selection and only sets the values assigned for these tokens as user selection. The value of the token can be a pipe ('|') separated JavaHomes. -->
<bea-installer>
<input-fields>
<data-value name="BEAHOME" value="/u01/app/oracle/fmw" />
<data-value name="WLS_INSTALL_DIR" value="/u01/app/oracle/fmw/wlserver_10.3" />
<data-value name="COMPONENT_PATHS" value="WebLogic Server/Core Application Server|WebLogic Server/Administration Console|WebLogic Server/Configuration Wizard and Upgrade Framework|WebLogic Server/Web 2.0 HTTP Pub-Sub Server|WebLogic Server/WebLogic SCA|WebLogic Server/WebLogic JDBC Drivers|WebLogic Server/Third Party JDBC Drivers|WebLogic Server/WebLogic Server Clients|WebLogic Server/WebLogic Web Server Plugins|WebLogic Server/UDDI and Xquery Support|Oracle Coherence/Coherence Product Files" />
<data-value name="LOCAL_JVMS" value="/u01/app/oracle/jdk"/>
</input-fields>
</bea-installer>

Save the file in the same location as the installation program ("/u01/app/stage" in my case).

2. Run the installation as the oracle user:

cd /u01/app/stage/
java -d64 -Xms512m -Xmx1024m -jar wls103x_generic.jar -mode=silent -silent_xml=/u01/app/stage/silent.xml

Extracting 0%....................................................................................................100%
Jan 24, 2012 3:10:29 PM java.util.prefs.FileSystemPreferences$2 run
INFO: Created user preferences directory.


Method 2: GUI Installation

1. Run the installation as the oracle user:

For Oracle JRocket:
java -Xms512m -Xmx1024m -jar wls103x_generic.jar


For Hybrid Oracle/Sun JDK:
java -d64 -Xms512m -Xmx1024m -jar wls103x_generic.jar

wls1035-inst01

2. Choose the location of middleware home:

wls1035-inst02

3. Optionally register for security updates. I tend to decline since this is not production, but feel free.

wls1035-inst03

wls1035-inst03a

wls1035-inst03b

It requires internet access so if you don't have, you should decline otherwise you will be greeted with the message below (you can also setup your proxy access here as well):

wls1035-inst03c

4. Select "Typical" installation. If you want to be a bit more specific in the components select "Custom" but ensure all the expected components are installed as expected by the application.

wls1035-inst04

5. Next up is the JDK select screen. The installation will detect the available JDK versions on your server if you have multiple versions and allow you to select the appropriate version. Select the correct version.

wls1035-inst05

6. Specify the product installation directories:

wls1035-inst05

7. You are presented with an installation summary where you can review what products will be installed:

wls1035-inst07

8. Following is the actual installation process where you can view the progress:

wls1035-inst08

9. Following a successful installation the completion screen is shown. Deselect the option to run the Quickstart process and you have completed your WLS installation:

wls1035-inst09

Wednesday, April 11, 2012

Oracle Internet Directory (OID) 11g: Part III - Schema Installation

This is part II in the series I started on installating and setting up OID11g (11.1.1.5.0) which is part of Oracle Fusion Middleware 11g and in this case licensed under Oracle Directory Services Plus. Please check my previous posts on licensing and requirements for those details. For this posting I'm assuming you've already created a certified repository database and are now ready to install and setup the OID schemas. In my case I created an 11.2.0.3 EE single instance database repository using ASM for storage management. Check my blog entries for details on installing and setting up Grid Infrastructure, and installing and creating a database. Yes, I know these are shameless plugs for additional page views and I would also appreciate you clicking on a few advertiser links while there as well, thanks!

The OID 11g installation will no longer create a repository so this must be done upfront. You do have the option of setting up the schemas but using the Repository Creation Utility or RCU upfront is recommended. RCU is a tool to create the repositories scheams for various Fusion Middleware tools, which in this case we will be using it to create schemas required for OID and DIP (Directory Integration Platform). What is RCU exactly? It is effectively the replacement in FMW 11g for the Oracle Application Server 10g Metadata Repository Creation Assistant (also known as MRCA or RepCA). The documentation will tell you that RCU can be downloaded from MOS, OTN and Oracle e-Delivery Cloud but for me it was a bit difficult to locate the actual download except for the latter, i.e. Oracle e-Delivery Cloud, so this is where I'd recommend searching to save time and effort. The RCU version must match the version of FMW or rather OID that you intend to use, which in my case is 11.1.1.5.0. I prefer command line installations since they can be scripted and run without user interaction so I'll start out with that method and show the GUI interactive method following.


Setup
1. Extract the download to a staging directory and export the location to your environment as RCU_HOME:

$> export RCU_HOME=/tmp/stage/rcu

2. RCU is apparently a 32-bit installation and requires a 32-bit OS to install but it is possible since 11.1.1.4.0 to install from a  64-bit OS:

$> set linux32 bash

Method 1 - Using Command Line in Silent Mode

3. Create a text file which contains the various passwords in sequence of being prompted:

$> vim rcupwd.txt
sysP#ssw0rd
odsP#ssw0rd
odsP#ssw0rd

The first password is for SYS, the second and third are for the Oracle Directory Services or ODS schema. It is repeated since there are two prompts for this user's password.

4. I prefer to use ASSM for my tablespaces but by default RCU does not create all the required tablespaces for the schemas as such. A bit curious given Oracle's constant recommendations on this front but not completely unexpected if you've done repository installations before. Modify file $RCU_HOME/integration/oid/oid_Storage.xml replacing as shown below:


      <TablespaceAttributes NAME="OLTS_BATTRSTORE" >
      <AutoSegmentSpaceManagement>false</AutoSegmentSpaceManagement>
...
    <TablespaceAttributes NAME="OLTS_SVRMGSTORE" >
      <AutoSegmentSpaceManagement>false</AutoSegmentSpaceManagement>
TO
    <TablespaceAttributes NAME="OLTS_BATTRSTORE" >
      <AutoSegmentSpaceManagement>true</AutoSegmentSpaceManagement>
...
    <TablespaceAttributes NAME="OLTS_SVRMGSTORE" >
      <AutoSegmentSpaceManagement>true</AutoSegmentSpaceManagement>


This ensures all TBS are created with ASSM as the database default of local extent management will be picked up. You may need to modify the extend sizes for the DBF manually after installation to ensure all extents are spread across all ASM disks for your AU size.

Installation
5. Run the RCU installation:

$> cd $RCU_HOME/bin
$> ./rcu -silent -createRepository -databaseType ORACLE -connectString [orads01.mydomain.lab:1521:dsrep.mydomain.lab] -dbUser sys -dbRole SYSDBA -component OID -variables RCU_LOG_LOCATION=/tmp -schemaPrefix LAB -f < rcupwd.txt
Processing command line ....
Repository Creation Utility - Checking Prerequisites
Checking Global Prerequisites

Repository Creation Utility - Checking Prerequisites
Checking Component Prerequisites
Repository Creation Utility - Creating Tablespaces
Validating and Creating Tablespaces
Repository Creation Utility - Create
Repository Create in progress.
Percent Complete: 0
Percent Complete: 35
Percent Complete: 29
Percent Complete: 91
Repository Creation Utility: Create - Completion Summary
Database details:
Host Name                       : orads02.mydomain.lab
Port                            : 1521
Service Name                    : DSREP.MYDOMAIN.LAB
Connected As                    : sys
Prefix for (non-prefixable) Schema Owners : DEFAULT_PREFIX
RCU Logfile                     : /u01/app/rcuHome/rcu/log/logdir.2012-01-24_13-37/rcu.log
Component schemas created:
Component                       Status  Logfile
Oracle Internet Directory               Success /u01/app/rcuHome/rcu/log/logdir.2012-01-24_13-37/oid.log
Repository Creation Utility - Create : Operation Completed

You can get the meaning of the various arguments I've used from the RCU documentation but they are pretty self explanatory.

Method 2 - Using the GUI

1. Issue the command:

$> $RCU_HOME/bin/rcu

rcu_oidschema-01

On the welcome screen, click "Next".

2. Select "Create" for creation of the schemas:

rcu_oidschema-02

3. Input the connection details into the appropriate fields, as shown in the screen shot:

rcu_oidschema-03

RCU will verify the information by making a test connection while also verifying that the database requirements are met to act as a repository:

rcu_oidschema-03b

4. Select the components to install, which is "Oracle Internet Directory". I also chose the "Directory Integration Platform" in my case though this is not shown in the screen shots.

rcu_oidschema-04

RCU checks that the component prequisites are okay.

rcu_oidschema-04b

5. The tablespace mapping is shown. I suggest leaving the defaults with the possible exception of the temp changed if needed (I changed mine to TEMP). You can manage the settings (such as ASSM and so on) via clicking on the "Manage Tablespaces" button.

rcu_oidschema-05

A confirmation box is displayed informing any non-existent tablespaces are about to be created, which is followed by another completion confirmation box:

rcu_oidschema-05b

rcu_oidschema-05c

6. The summary screen is displayed which indicates you are about to begin creation of the schemas:

rcu_oidschema-06

7. Once completed summary completion screen is shown:

rcu_oidschema-07

At this point setup of the OID repository is complete and you can move on to the installation of WebLogic or OID software which I will demonstrate in another blog entry. The sequence does not matter since only the software for OID will be installed (and patched), however, the WLS piece and all other pre-requisites (DB repository) should be in place prior to starting OID configuration.