In previous part we’ve covered installation of Oracle Weblogic Server 12c Installing Oracle WebLogic Server 12c and Oracle HTTP Server Part I. In this, second part we will continue with installation of an Oracle HTTP Server 12c.
Oracle HTTP Server is the web server component for Oracle Fusion Middleware. It provides a listener for Oracle WebLogic Server and the framework for hosting static pages, dynamic pages, and applications over the Web.
In this demo we will install an Oracle HTTP Server in a Standalone Domain.
Prerequisites for this tutorial:
[neo@ohs12c-node1 ~]$ xauth list ohs12c-node1.zion.local/unix:10 MIT-MAGIC-COOKIE-1 f6f3213ef669742b98f794bb5d574af5 [neo@ohs12c-node1 ~]$ sudo su - oracle [sudo] password for neo: [oracle@ohs12c-node1 ~]$ xauth add ohs12c-node1.zion.local/unix:10 MIT-MAGIC-COOKIE-1 f6f3213ef669742b98f794bb5d574af5 [oracle@ohs12c-node1 ~]$ export DISPLAY=localhost:10.0
[oracle@ohs12c-node1 ~]$ cd /tmp/; unzip ofm_ohs_linux_12.1.2.0.0_64_disk1_1of1.zip Archive: ofm_ohs_linux_12.1.2.0.0_64_disk1_1of1.zip inflating: ohs_121200_linux64.bin [oracle@ohs12c-node1 tmp]$ ./ohs_121200_linux64.bin 0%...........................................
[oracle@ohs12c-node1 ~]$ cd /u01/app/oracle/product/12.1.2/ohs/ohs/common/bin [oracle@ohs12c-node1 bin]$ ./config.sh
2. Starting OHS server instance ohs1
[oracle@ohs12c-node1 ~]$ cd /u01/app/oracle/config/zion_t1_ohs_domain1/bin [oracle@ohs12c-node1 bin]$ nohup ./startNodeManager.sh > /dev/null 2>&1 &
[oracle@ohs12c-node1 bin]$ ./startComponent.sh ohs1 Starting System Component ohs1 ... Initializing WebLogic Scripting Tool (WLST) ... Welcome to WebLogic Server Administration Scripting Shell Type help() for help on available commands Reading domain from /u01/app/oracle/config/zion_t1_ohs_domain1 Please enter your password : ***** <nm_manager password> Connecting to Node Manager ... Successfully Connected to Node Manager. Starting server ohs1 ... Successfully started server ohs1 ... Successfully disconnected from Node Manager. Exiting WebLogic Scripting Tool. Done [oracle@ohs12c-node1 bin]$
Hint: You can avoid having to enter your Node Manager password every time you launch the server with startComponent.sh by starting it with the storeUserConfig option for the first time. Do the following: At the prompt, enter the following command:
$DOMAIN_HOME/bin/startComponent.sh componentName storeUserConfig
The system will prompt for your Node Manager password.
[oracle@ohs12c-node1 bin]$ ./stopComponent.sh ohs1 Stopping System Component ohs1 ... Successfully killed server ohs1 Successfully disconnected from Node Manager. Exiting WebLogic Scripting Tool. Done
[oracle@ohs12c-node1 bin]$ ./startComponent.sh ohs1 storeUserConfig Starting System Component ohs1 ... Initializing WebLogic Scripting Tool (WLST) ... Welcome to WebLogic Server Administration Scripting Shell Type help() for help on available commands Reading domain from /u01/app/oracle/config/zion_t1_ohs_domain1 Please enter your password : ********* Creating the key file can reduce the security of your system if it is not kept in a secured location after it is created. Do you want to create the key file? y or n [type: y] The username and password that were used for this WebLogic NodeManager connection are stored in /home/oracle/.wlst/nm-cfg-zion_t1_ohs_domain1.props and /home/oracle/.wlst/nm-key-zion_t1_ohs_domain1.props. Connecting to Node Manager ... Successfully Connected to Node Manager. Starting server ohs1 ... Successfully started server ohs1 ... Successfully disconnected from Node Manager. Exiting WebLogic Scripting Tool. Done [oracle@ohs12c-node1 bin]$
At this moment we have OHS server up and running. Now we will configure it to redirect our requests to a WebLogic Server 12c domain which is running on wls12-node1 host.
We configure the WebLogic Proxy Plug-In manually by specifying directives in the mod_wl_ohs.conf file. Edit mod_wl_ohs.conf
[oracle@ohs12c-node1 bin]$ cd /u01/app/oracle/config/zion_t1_ohs_domain1/config/fmwconfig/components/OHS/ohs1/ [oracle@ohs12c-node1 ohs1]$ vi mod_wl_ohs.conf
# Admin Console of a WebLogic domain on wls12c-node1 # With the following configuration, requests for the /console URI received at the Oracle HTTP Server # listen port (7777) will be forwarded to /console on the Oracle WebLogic Server port 7001 <IfModule weblogic_module> <Location /console> WLSRequest On WebLogicHost wls12c-node1.zion.local WeblogicPort 7001 </Location> </IfModule> # Hello Word Application # With the following configuration, requests for the /Hello URI # received at the Oracle HTTP Server listen port (7777) will be forwarded to /Hello # the Oracle WebLogic Server cluster containing the managed servers with the listen ports wls12c-node1:7003 # and in case of the cluster: wls12c-node2:7003 (node2 is not part of this tutorial). <IfModule weblogic_module> <Location /Hello> WLSRequest On WebLogicCluster wls12c-node1.zion.local:7003,wls12c-node2.zion.local:7003 </Location> </IfModule>More configuration examples could be found here: Configuring the WebLogic Proxy Plug-In Manually
[oracle@ohs12c-node1 ~]$ cd /u01/app/oracle/config/zion_t1_ohs_domain1/bin [oracle@ohs12c-node1 bin]$ ./stopComponent.sh ohs1 ... ... [oracle@ohs12c-node1 bin]$ ./startComponent.sh ohs1
We have just completed basic installation of Oracle WebLogic Server in configuration with Oracle HTTP Server 12c.
References:
That’s all folks!