Tuesday, 26 April 2016

Weblogic 11g installation in Oracle Red Hat Linux 6.7

Objective

  • Installing Weblogic 11g (10.3.6) into Oracle Red Hat Linux 6.7 VM.



Installation Steps
  • Verify Virtual Machine Details
    • Ensure you have the SSH root credentials to the VM
    • Verify HW details
      • $cat /proc/cpuinfo
      • $free -m
    • Verify OS details via following commands:
§  $cat /etc/oracle-release
Red Hat Enterprise Linux Server release 6.7 (Santiago)
§  $cat /etc/redhat-release
Oracle Linux Server release 6.7
§  $uname -a
Linux <HOSTNAME> 3.8.13-44.1.1.el6uek.x86_64 #2 SMP Wed Sep 10 06:10:25 PDT 2014 x86_64 x86_64 x86_64 GNU/Linux
  • Create weblogic user and group
    • $groupadd -g 1000 weblogic
    • $useradd -u 1100 -g weblogic weblogic
    • $passwd weblogic (give password as weblogic)
  • Create weblogic installation directory
    • $mkdir /usr/local/bea
    • $chown -R weblogic:weblogic /usr/local/bea
    • $chmod -R 775 /usr/local/bea
  • Download Weblogic 11g (10.3.6) installable
  • Install Weblogic 11g
    • Verify Java 8 is installed
      • $which java
§  $java -version
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)       
    • Perform Silent installation of Weblogic 11g
§  Add the following entries into /home/weblogic/.bash_profile file:
export MW_HOME=/usr/local/bea
export WLS_HOME=$MW_HOME/wlserver_10.3
export WL_HOME=$WLS_HOME
# Set to appropriate JAVA_HOME.
export JAVA_HOME=/usr/java/jdk1.8.0_45/
export JAVA_OPTIONS="-Djava.security.egd=file:/dev/./urandom"
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
export PATH
      • Switch to weblogic user
        • su - weblogic
      • Create silent installation response file
        • $vi silent.xml
§  Add following entries
<?xml version="1.0" encoding="UTF-8"?>
<bea-installer>
<input-fields>
<data-value name="BEAHOME" value="/usr/local/bea" />
<data-value name="WLS_INSTALL_DIR" value="/usr/local/bea/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|Oracle Coherence/Coherence Product Files" />
<data-value name="INSTALL_NODE_MANAGER_SERVICE" value="yes" />
<data-value name="NODEMGR_PORT" value="5556" />
<data-value name="INSTALL_SHORTCUT_IN_ALL_USERS_FOLDER" value="no"/>
<data-value name="LOCAL_JVMS" value="/usr/java/jdk1.8.0_45"/>
</input-fields>
</bea-installer>
      • Start the silent installation
        • $java -Xmx1024m -jar wls1036_generic.jar -mode=silent -silent_xml=silent.xml
        • Make sure installation completes successfully without any error.
        • Verify installation via following steps
          • $. $WLS_HOME/server/bin/setWLSEnv.sh
§  $java weblogic.version
WebLogic Server 10.3.6.0  Tue Nov 15 08:52:36 PST 2011 1441050 
  • urandom change for faster startup of Weblogic Servers
o    Make sure following entry exist in /home/weblogic/.bash_profile file:
export JAVA_OPTIONS="-Djava.security.egd=file:/dev/./urandom"
  • Install VNC Server for GUI based Domain creation wizard
    • $yum install tigervnc-server
    • $vi /etc/sysconfig/vncservers
    • $su - weblogic
    • $vncpasswd
    • $chkconfig vncserver on
    • $service vncserver on
    • $service iptables stop
    • Verify you are able to connect via VNC client in your desktop
  • Create Domain and Configure Machine, Server & Other details
    • Connect to VM via VNC Client
    • Run the domain creation wizard
      •  $/usr/local/bea/utils/quickstart/quickstart.sh
      • Select "Getting started with WebLogic Server 10.3.6"
      • Select "Create a new WebLogic domain" and click "Next"
      • Select "Generate a domain configured automatically to support the following products:" and click "Next"
      • Enter the domain name as "AppTier" and click "Next"
      • Enter Name as "weblogic" and password as "Avaya123" and click "Next"
      • Select "Sun SDK 1.8.0_45 @ /usr/java/jdk1.8.0_45" and click "Next"
      • Select "Administration Server" and click "Next"
      • Click "Create"
      • Once progress completes, Ctrl+C to end the domain wizard.
      • Close the VNC client
    • Start the Admin Server
      • Come back to SSH CLI mode on VM
      • $su - weblogic
      • $cd /usr/local/bea/user_projects/domains/AppTier
      • $nohup ./startWebLogic.sh &
      • Open web browser and hit the URL "http://<HOST-NAME>:7000/console/login/LoginForm.jsp" and enter credentials as "weblogic/Avaya123"
    • Create Machines
      • Select from left tree "AppTier -> Enviornment -> Machines" and click "New"
      • Provide name as "<HOST-NAME>" and Os as "Unix", and click "Next"
      • Select Type as "Plain", Address as "<HOST-NAME>", Port as "5556" and click "Finish"
    • Create Servers
      • Create Server: Server-1
        • Select from left tree "AppTier-> Enviornment -> Servers" and click "New"
        • Provide Server name as "Server-1", Port as "8080", select "No, this is a stand-alone server.", and Click "Finish"
§  Navigate to the Server-1 management page by clicking the Server-1 name entry in the Summary of Servers table.
§  In the general tab, select "<HOST-NAME>" in the Machine drop-down box, disable "SSL Listen Port Enabled" and Click Save.
§  In the Server Start tab, ether the following information and click save
§  Java Home as "/usr/java/jdk1.8.0_45/"
§  Java Vendor as "Sun"
§  Arguments as 
-DIAM_MID_TIER=1 -Xms1024m -Xmx3076m -XX:MaxPermSize=512m -Djava.library.path=/usr/local/bea/wlserver_10.3/server/native/linux/x86_64 -Dweblogic.webservice.verbose=true
      • Start the Servers
      • kill all running java processes using $kill -9 <PID list space seprated>
      • Make the Server to NodeManager communication non-SSL
        •  $vi /usr/local/bea/wlserver_10.3/common/nodemanager/nodemanager.properties
SecureListener=false
      • Start the NodeManager
        • $cd /usr/local/bea/wlserver_10.3/server/bin
        • $nohup ./startNodeManager.sh &
      • Start the AdminServer
        • $cd /usr/local/bea/user_projects/domains/AppTier
        • $nohup ./startWebLogic.sh &
      • Start the Server
        • Open Web Browser and login to Admin Conole: http://<HOST-NAME>:7000/console/login/LoginForm.jsp
        • Select from left tree "AppTier-> Enviornment -> Servers"
        • Select the Server Server-1, go to the management page, click on "Control" tab and click on "Start" button at the botton
    • Verify installation
      • Check number of java processes
        • $ps -eaf | grep java
          • You must see 5 java processes against following:
            • Node Manager
            • Admin Server
            • Server-1 Server
  • HTTPS Enablement for Node Manager and Servers
    • TBD: Will have new Post created for it.



Troubleshooting Steps
  • Weblogic Installation and Configuration
    • Silent installation throws error
      • Make sure silent.xml is constructed correctly, the values in "COMPONENT_PATHS" should be correct, better copy-paste the entries captured here.
    • Weblogic start is too slow
      • Make sure the following steps is performed correctly
        • urandom change for faster startup of Weblogic Servers
    • Servers not able to start, failing on communication with NodeManager
      • Check the NodeManager logs for the errors, if SSL error then you may try setup first on non-SSL communication by following the steps mentioned under Make the Server to NodeManager communication non-SSL mentioned above.



Thank You!