Tuesday, August 13, 2013

Enabling Memory Dumps



Stop all SOA Services  Using Admin Console

cd $DOMAIN_HOME/bin

Take backup of setSOADomainEnv.sh

cp setSOADomainEnv.sh setSOADomainEnv.sh.bkp

Before:
 ==================================================================

cat setSOADomainEnv.sh | grep PORT_MEM_ARGS
PORT_MEM_ARGS="-Xms1024m -Xmx2048m"
  PORT_MEM_ARGS="${PORT_MEM_ARGS} -XX:PermSize=1024m -XX:MaxPermSize=1024m"
    USER_MEM_ARGS=${PORT_MEM_ARGS}
    USER_MEM_ARGS="-d64 ${PORT_MEM_ARGS}"
       USER_MEM_ARGS="${PORT_MEM_ARGS}"
       USER_MEM_ARGS=${PORT_MEM_ARGS}
    USER_MEM_ARGS="-d64 ${PORT_MEM_ARGS}"

After:
=================================================================== 
 cat setSOADomainEnv.sh | grep PORT_MEM_ARGS
 PORT_MEM_ARGS="-Xms1024m -Xmx2048m"
   PORT_MEM_ARGS="${PORT_MEM_ARGS} -XX:PermSize=1024m -XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/ud2004/dump"
     USER_MEM_ARGS=${PORT_MEM_ARGS}
     USER_MEM_ARGS="-d64 ${PORT_MEM_ARGS}"
        USER_MEM_ARGS="${PORT_MEM_ARGS}"
        USER_MEM_ARGS=${PORT_MEM_ARGS}
     USER_MEM_ARGS="-d64 ${PORT_MEM_ARGS}"

Start All SOA Services and perform health check.


Monday, July 29, 2013

Weblogic Installation on Linux 5

WEBLOGIC INSTALLATION ON LINUX PLOTFORM

Linux Operating System Requirements


x86-64
Oracle Linux 5 (UL3+)
Red Hat Linux 5 (UL3+)
binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3 for x86-64
compat-libstdc++-33-3.2.3 for i386
elfutils-libelf-0.125
elfutils-libelf-devel-0.125
gcc-4.1.1
gcc-c++-4.1.1
glibc-2.5-12 for x86_64
glibc-2.5-12 for i686
glibc-common-2.5
glibc-devel-2.5 for x86-64
glibc-devel-2.5-12 for i386
libaio-0.3.106 for x86_64
libaio-0.3.106 for i386
libaio-devel-0.3.106
libgcc-4.1.1 for x86_64
libgcc-4.1.1 for i386
libstdc++-4.1.1 for x86_64
libstdc++-4.1.1 for i386
libstdc++-devel-4.1.1
libXext for i386
libXtst for i386
libXi for i386
make-3.81
openmotif-2.2.3
openmotif22-2.2.3
redhat-lsb-3.1-12.3.EL.0.2
sysstat-7.0.0
xorg-x11-utils
KERNEL PARAMETERS:
Change the value of SHMMAX to 4294967295 by including the following line in /etc/sysctl.conf:
1.     kernel.shmmax = 4294967295
2.     Activate the new SHMMAX setting by running the command:
3.     /sbin/sysctl -p
4.     Start the Oracle Universal Installer and install your software.

Setting the Open File Limit

On all UNIX operating systems, the minimum Open File Limit should be 4096. You can see how many files are open with the following command:
/usr/sbin/lsof | wc -l
To check your open file limits, use the commands below.
For C-shell:
limit descriptors
For Bash:
ulimit -n
To change the open file limits, login as root and edit the /etc/security/limits.conf file. Look for the following two lines:
* soft  nofile  2048
* hard  nofile  2048
Change the values from 2048 to 4096, then reboot the machine.

Enabling Unicode Support

In a design-time environment, if you are using Oracle JDeveloper, select Tools -> Preferences -> Environment -> Encoding -> UTF-8 to enable Unicode support.
Setup
The following actions should be performed by the "root" user.
Make sure the "/etc/hosts" file contains correct entries for both the "localhost" and real host names.
127.0.0.1      localhost localhost.localdomain localhost4 localhost4.localdomain4
192.168.0.198  ol6-forms.localdomain ol6-forms
Create a new group and user.
groupadd -g 1000 oinstall
useradd -u 1100 -g oinstall oracle
passwd oracle
Create the directories in which the Oracle software will be installed.
mkdir -p /u01/app/oracle/middleware
chown -R oracle:oinstall /u01
chmod -R 775 /u01/
Append the following entries into the "/home/oracle/.bash_profile" file.
export MW_HOME=/u01/app/oracle/middleware
export WLS_HOME=$MW_HOME/wlserver_10.3
export WL_HOME=$WLS_HOME
# Set to the appropriate JAVA_HOME.
#export JAVA_HOME=/usr/java/jdk1.6.0_33
#export JAVA_HOME=$MW_HOME/jrockit-jdk1.6.0_37-R28.2.5-4.1.0
export JAVA_HOME=$MW_HOME/jdk1.7.0_17
export PATH=$JAVA_HOME/bin:$PATH
Install the JDK. OR JRockit
# # Java 6 as root
# rpm -Uvh jdk-6u33-linux-amd64.rpm

Or

$ # Java 7 as Oracle
$ cd /u01/app/oracle/middleware
$ tar -xvzf /tmp/jdk-7u17-linux-x64.tar.gz
Installation
Run the installer as the "oracle" user.
$ $JAVA_HOME/bin/java -Xmx1024m -jar wls1036_generic.jar
Click the "Next" button on the welcome screen.
Welcome
Enter the middleware home ("/u01/app/oracle/middleware") and click the "Next" button.
Choose Middleware Home Directory
Either enter your support details, or attempt to uncheck the security updates checkbox. The box doesn't actually uncheck, but presents you with a warning dialog. If you click the "Yes" button, indicating you don't want updates, you are returned to the same screen with the box still checked. Click the "Next" button anyway.
Register For Security Updates
Assuming you don't want security updates, click "Yes" and "Yes" on the subsequent warning dialogs and you are presented with the "Connection Failed" screen. Check the "I wish to remain uninformed..." checkbox and click the "Continue" button. This whole process is very confusing at first. Obviously the developers responsible didn't really expect people to say no to security updates!
Connection Failed
Accept the typical setup by clicking the "Next" button.
Choose Install Type
Accept the default JDK selection by clicking the "Next" button.
JDK Selection
Accept the default product installation directories by clicking the "Next" button.
Choose Product Installation Directories
If you are happy with the summary information, click the "Next" button and wait while the installation completes.
Installation Summary
On the installation complete screen, uncheck the "Quickstart" checkbox and click the "Done" button.
Installation Complete

Create Domain
If you are planning to use this installation for something other than Oracle Forms and Reports Services, you will need to create a domain. This can be done using the Quickstart utility.
$ $MW_HOME/utils/quickstart/quickstart.sh
Quickstart
$ # Start the configuration wizard
$ $WLS_HOME/common/bin/config.sh

Welcome
Select the type of domain and click the "Next" button.
Select Domain Source
Enter the desired domain name and location, then click the "Next" button.
Specify Domain Name And Location
Enter the administrator username and password, then click the "Next" button.
Configure Administrator User Name And Password
Select the startup mode and JDK, then click the "Next" button.
Configure Server Start Mode And JDK
Select any required optional configuration, then click the "Next" button.
Select Optional Configuration
If you are happy with the information on the summary screen, click the "Create" button.
Configuration Summary
Once the domain is created, click the "Done" button.
Creating Domain
Close the Quickstart screen, unless you have any other operations to do.
The "$MW_HOME/user_projects/domains/mydomain" directory now contains a script that can be used to start the server. Remember to use the "&" if you want control of the command line returned.
$ cd $MW_HOME/user_projects/domains/mydomain
$ ./startWebLogic.sh &
Post-Installation
Once the server is started you can access the administrator console using the "http://hostname:7001/console" URL. Log in using the username and password provided in the previous step.
Administration Console
The following scripts are useful.
$ # Start NodeManager
$ nohup $WLS_HOME/server/bin/startNodeManager.sh > /dev/null 2>&1 &


$ # Start WebLogic
$ nohup $MW_HOME/user_projects/domains/mydomain/startWebLogic.sh > /dev/null 2>&1 &

$ # Stop WebLogic
$ $MW_HOME/user_projects/domains/mydomain/bin/stopWebLogic.sh


$ # Start Managed Server
$ nohup $MW_HOME/user_projects/domains/mydomain/bin/startManagedWebLogic.sh Manage Server  Name > /dev/null 2>&1 &

$ # Stop Managed Server
$ $MW_HOME/user_projects/domains/mydomain/bin/stopManagedWebLogic.sh  Manage Server  Name

.
Check the version.
$ . $WLS_HOME/server/bin/setWLSEnv.sh
$ java weblogic.version

WebLogic Server 10.3.6.0.3 PSU Patch for BUG14736139 Fri Nov 23 10:16:54 IST 2012
WebLogic Server 10.3.6.0  Tue Nov 15 08:52:36 PST 2011 1441050

Use 'weblogic.version -verbose' to get subsystem information

Use 'weblogic.utils.Versions' to get version information for all modules
$


A Sample silent.xml File for Silent-Mode Installation


<?xml version="1.0" encoding="UTF-8"?>
<!-- Silent installer option: -mode=silent -silent_xml=C:\bea\silent.xml -->
<!-- Specify values for each data-value name as follows: 
 
     BEAHOME            Complete pathname to the BEA 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.
 
     See the Installation Guide for more information.
 
<?xml version="1.0" encoding="UFF-8"?>
   <bea-installer> 
     <input-fields>
       <data-value name="BEAHOME" value="D:\Oracle\Middleware_Home" />
       <data-value name="WLS_INSTALL_DIR" value="D:\Oracle\Middleware_Home\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 
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|WebLogic Server/Server Examples" />
       <data-value name="INSTALL_NODE_MANAGER_SERVICE" value="yes" />
       <data-value name="NODEMGR_PORT" value="5559" />
       <data-value name="INSTALL_SHORTCUT_IN_ALL_USERS_FOLDER" value="yes"/>
    <!--
    <data-value name="LOCAL_JVMS" value="D:\jrockit_160_05|D:\jdk160_11"/>
    -->
 
   </input-fields> 
</bea-installer>


./wls1036_linux32.bin -mode=silenlent.xml -log=/home/oracle/WLSInstallers/install.log
Exit Codes for Silent Mode Installation
When run in silent mode, the installation program generates exit codes that indicate the success or failure of the installation.


Exit Codes for Silent Mode Installation
Exit Code
Description
0
Installation completed successfully
-1
Installation failed due to a fatal error
-2
Installation failed due to an internal XML parsing error