Friday, July 21, 2017

Steps to configure OHS Plugin 12.2.1.x to proxy requests to WLS 12.2.1.2

 Objective:


To integrate OHS 12.2.x with WLS 12.2.x and proxy the requests via proxy plugin shipped with OHS Server.



1.  Download, Install & start Weblogic server 12.2.x 
Refer below site
https://oracle-base.com/articles/12c/weblogic-installation-on-oracle-linux-6-and-7-1221


2. Download OHS 12.2.1.2 from Oracle Site

http://www.oracle.com/technetwork/middleware/webtier/downloads/index.html


3. Video Link to  Install OHS 12.2.1.x in Collocated & Standalone Mode





 4. Configure the OHS Server in a standalone Domain using configuration wizard

 Invoke the config.cmd under ${domain_home}\bin folder and choose OHS in the template like below

 
Refer link below
 https://docs.oracle.com/middleware/1212/webtier/WTINS/standalone_domain.htm#WTINS333




5. Edit the mod_wl_ohs.conf file located under ${domain_home}\config\fmwconfig\components\OHS\instances\ohs1

<IfModule weblogic_module>
<Location /console>
WLSRequest On
WebLogicHost localhost
WeblogicPort 7001

</Location>
</IfModule>


 6. Start Nodemanager 

Execute script startNodeManager.cmd under ${domain_home}\bin directory.

7. Start OHS Instance by executing the command under  ${domain_home}\bin directory 

startComponent.cmd ohs1


Sample output
==============

C:\OHS_andalone\user_projects\domains\OHS_domain\bin>startComponent.cmd 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 C:/Oracle/Middleware/OHS_Standalone/user_projects/domains/OH
S_domain


Please enter Node 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


To stop the OHS Instance

Invoke the script stopComponent.cmd ohs1


7.  Hit the console using the URL
http://localhost:7777/console/login/LoginForm.jsp


Tuesday, July 11, 2017

Steps to integrate Weblogic Server 12.2.x with Microsoft IIS 7.5 Web server using WLS Plugin 11g


Introduction

Steps describing installation , configuration of weblogic server proxy plugin with MS IIS  Server 7.x
 

Installation
1.  Download, Install & start Weblogic server 12.2.x 

Refer below site
https://oracle-base.com/articles/12c/weblogic-installation-on-oracle-linux-6-and-7-1221
2.  Download Web server plugins 11g from Oracle site. 
http://www.oracle.com/technetwork/articles/wls-plugins-096117.html

3. Install IIS 7.5 on Windows 7 Server
Refer link below 

https://technet.microsoft.com/en-us/library/cc725762(v=ws.11).aspx



Ensure to have WWW service started from services.msc


Video link to install IIS 7 Server

Video to verify the IIS Server 


Configuration Steps

  Create a file and name it as iisproxy.ini with the below content 

WebLogicHost=URL_of_WebLogic_Host 
WebLogicPort=WebLogic_Port 
Debug=ALL 
DebugConfigInfo=ON 
WLLogFile=C:\Temp\wl-proxy.log
Configure the weblogic host & port number in the above file. 


 Copy the whole contents of the downloaded plugin to below folder location i.e under c:\inetpub\wwwroot\iisproxy


Set the path environment variable to below
c:\inetpub\wwwroot\iisproxy\lib




Open IIS Manager UI  

To open IIS Manager from the Search box 1. Click Start. 2. In the Start Search box, type inetmgr and press ENTER.


Click on the Sites and Create a new Website by name or can use the Default web site
Add an application right clicking on the new site  or Default site
Give the application name and the path till lib of your Plugin lib folder
Here we are configuring Weblogic Console . 




Enable Directory browsing for the site.

Now click on the Handler mapping and select the “Add Script Map”

Provide the request path (ex: console)

Provide the Executable Location (till iisproxy.dll

IIS 7 proxy plugin configuration is complete.

Access the console of weblogic via proxy server and test




Troubleshooting/logging/tracing
Under construction...

Thursday, July 6, 2017

Steps to integrate Weblogic Server with Apache Http Server 2.4.x using WLS Plugin



Introduction


Oracle Weblogic Server proxy plugin 12.2.x for Apache Http Server is supported on Apache 2.2 & 2.4 web servers


Environment Details
OS : Red hat linux 3.10.x   x86_64 Architecture
WLS Version : 12.2.1.2
Apache Server version : 2.4.6.x
Plugin Version : 12.2.x


Steps  are below  to integrate  Weblogic Server 12.2.1.2 with Apache Http Server 2.4.x using WLS Plugin 12c


1. Install Weblogic Server 12c (latest 12.2.1.2.0)


Refer below site

https://oracle-base.com/articles/12c/weblogic-installation-on-oracle-linux-6-and-7-1221

2 . Download and Install Apache HTTP Server (2.4.x)
http://httpd.apache.org/download.cgi


Installation Guide
http://httpd.apache.org/docs/2.4/install.html


OR
To use yum rpm installer on Linux , following this link from Redhat

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Managing_Confined_Services/chap-Managing_Confined_Services-The_Apache_HTTP_Server.html



Refer link below to Install http service on Linux and starting & stopping service. Refer this below doc

https://www.cyberciti.biz/faq/linux-install-and-start-apache-httpd/



Sample commands

service httpd start
service httpd stop
service httpd restart
service httpd status



Run below command to verify if Apache Http Server is already installed
$ rpm -q httpd

Sample output : httpd-2.4.6-45.el7_3.4.x86_64



3. Download latest plugins of Apache Http Server for WLS 12c  from below site for your OS Version
http://www.oracle.com/technetwork/middleware/webtier/downloads/index-jsp-156711.html


4.  Extract the plug-ins zip distribution to PLUGIN_HOME
and move the below .so file



mod_wl_xx*.so to ..%apache_home%/modules directory


5.  Set/Export  LD_LIBRARY_PATH to extracted ${PLUGIN_HOME}/lib folder..


For eg

export LD_LIBRARY_PATH=.../weblogic-plugins-12.2.1/lib


6. Modify the httpd.conf file located under 
/etc/httpd/conf   or Apache_home/conf folder

Add the below snippet to the end of the file

LoadModule weblogic_module modules/mod_wl_24.so

<IfModule mod_weblogic.c>
  WebLogicHost 127.0.0.1
 WebLogicPort 7001
 #MatchExpression *.jsp
 MatchExpression /*
 DebugConfigInfo ON
</IfModule>



 Note: Backup httpd.conf file
##Line LoadModule loading  mod_wl_24.so  for Apache web server 2.4.x

For 2.2.xversion , use below lin

LoadModule weblogic_module /home/myhome/weblogic-plugins-12.2.1/lib/mod_
wl.so 

7. Restart Http Server and Weblogic Server

8. Hit the weblogic console using the link below to test
http://localhost/console



Misc




If you choose to not use the <IfModule>, you can instead directly place the WebLogic
properties inside Location or <VirtualHost> blocks.
Consider the following examples of the <Location> and <VirtualHost> blocks:
<Location /weblogic>
WLSRequest On
WebLogicHost myweblogic.server.com
WebLogicPort 7001
</Location>
<Location /weblogic>
WLSRequest On
WebLogicCluster w1s1.com:7001,w1s2.com:7001,w1s3.com:7001
</Location>
<VirtualHost apachehost:80>
WLSRequest On
WebLogicServer weblogic.server.com
WebLogicPort 7001
</VirtualHost>


Monday, July 3, 2017

Install & Configure IBM MQ 8.x on Linux OS


 Download and Install IBM MQ
 
##########Extract the archive file############


[vijayalakshmi@oc3601157205 SametimeFileTransfers]$ tar -zxvf WSMQ_8.0.0.4_TRIAL_LNX_ON_X86_64_.tar.gz
MQServer/
MQServer/MQSeriesMan-8.0.0-4.x86_64.rpm
MQServer/READMES/
MQServer/READMES/readme_es_ES
MQServer/READMES/readme_it_IT
MQServer/READMES/readme_ru_RU
MQServer/READMES/readme_cs_CZ
MQServer/READMES/readme_zh_TW

...............
..................


##########Switch to Root user##########

[vijayalakshmi@oc3601157205 MQServer]$ sudo su - root
[root@oc3601157205 ~]# pwd
/root

######Accept license #################

[root@oc3601157205 MQServer]# ./mqlicense.sh

Licensed Materials - Property of IBM 
                 
 5724-H72 

 (C) Copyright IBM Corporation 1994, 2015 

US Government Users Restricted Rights - Use, duplication or disclosure
restricted by GSA ADP Schedule Contract with IBM Corp.


Displaying license agreement on :0

Agreement accepted:  Proceed with install.


############ Run the installation using Redhat Package Manager################

[root@oc3601157205 MQServer]# rpm -ivh MQSeriesRuntime-8.0.0-4.x86_64.rpm
Preparing...                          ################################# [100%]
Creating group mqm
Creating user mqm
Updating / installing...
   1:MQSeriesRuntime-8.0.0-4          ################################# [100%]
[root@oc3601157205 MQServer]# rpm -ivh MQSeriesServer-8.0.0-4.x86_64.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:MQSeriesServer-8.0.0-4           ################################# [100%]
Updated PAM configuration in /etc/pam.d/ibmmq



[root@oc3601157205 MQServer]# rpm -ivh MQSeriesClient-8.0.0-4.x86_64.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:MQSeriesClient-8.0.0-4           ################################# [100%]
[root@oc3601157205 MQServer]# rpm -ivh MQSeriesSDK-8.0.0-4.x86_64.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:MQSeriesSDK-8.0.0-4              ################################# [100%]
[root@oc3601157205 MQServer]# rpm -ivh MQSeriesSamples-8.0.0-4.x86_64.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:MQSeriesSamples-8.0.0-4          ################################# [100%]


[root@oc3601157205 MQServer]# rpm -ivh MQSeriesJava-8.0.0-4.x86_64.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:MQSeriesJava-8.0.0-4             ################################# [100%]
[root@oc3601157205 MQServer]# rpm -ivh MQSeriesMan-8.0.0-4.x86_64.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:MQSeriesMan-8.0.0-4              ################################# [100%]
[root@oc3601157205 MQServer]# rpm -ivh MQSeriesJRE-8.0.0-4.x86_64.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:MQSeriesJRE-8.0.0-4              ################################# [100%]
[root@oc3601157205 MQServer]# rpm -ivh MQSeriesExplorer-8.0.0-4.x86_64.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:MQSeriesExplorer-8.0.0-4         ################################# [100%]




##########To Verify Packages Installed ######################3

-bash-4.2$ rpm -qa | grep MQS*
MQSeriesJRE-8.0.0-4.x86_64
MQSeriesSamples-8.0.0-4.x86_64
MQSeriesServer-8.0.0-4.x86_64
MQSeriesMan-8.0.0-4.x86_64
MQSeriesSDK-8.0.0-4.x86_64
MQSeriesRuntime-8.0.0-4.x86_64
MQSeriesExplorer-8.0.0-4.x86_64
MQSeriesJava-8.0.0-4.x86_64
MQSeriesClient-8.0.0-4.x86_64





##########Navigate to below directory  & set MQ Installation PATH#############################

[root@oc3601157205 /]# cd /opt/mqm/bin




[root@oc3601157205 bin]# ./setmqinst -i -n installation1
Refreshing settings for primary installation 'Installation1' (/opt/mqm).
120 of 120 tasks have been completed successfully.
'Installation1' (/opt/mqm) set as the primary installation.

################## Display MQ Version & Installation details#################

[root@oc3601157205 bin]# dspmqver
Name:        WebSphere MQ
Version:     8.0.0.4
Level:       p800-004-151023.TRIAL
BuildType:   IKAP - (Production)
Platform:    WebSphere MQ for Linux (x86-64 platform)
Mode:        64-bit
O/S:         Linux 3.10.0-514.el7.x86_64
InstName:    Installation1
InstDesc:    
Primary:     Yes
InstPath:    /opt/mqm
DataPath:    /var/mqm
MaxCmdLevel: 802



#############Create Queue Manager#####################

[root@oc3601157205 bin]# ./crtmqm NOKIA
AMQ7077: You are not authorized to perform the requested operation.
[root@oc3601157205 bin]# whoami
root


############Switch to MQM Domain/group#################

[root@oc3601157205 bin]# sudo su - mqm
Last login: Wed Jun 14 15:32:36 IST 2017 on pts/0
-bash-4.2$ pwd
/var/mqm

-bash-4.2$ whoami
mqm


-bash-4.2$ id mqm
uid=106(mqm) gid=1002(mqm) groups=1002(mqm)


- 


#############Create Queue Manager#####################

-bash-4.2$ crtmqm NOKIA
There are 90 days left in the trial period for this copy of WebSphere MQ.
WebSphere MQ queue manager created.
Directory '/var/mqm/qmgrs/NOKIA' created.
The queue manager is associated with installation 'Installation1'.
Creating or replacing default objects for queue manager 'NOKIA'.
Default objects statistics : 79 created. 0 replaced. 0 failed.
Completing setup.
Setup completed.


###############Start Queue Manager ######################

-bash-4.2$ strmqm NOKIA
There are 90 days left in the trial period for this copy of WebSphere MQ.
The system resource RLIMIT_NOFILE is set at an unusually low level for WebSphere MQ.
WebSphere MQ queue manager 'NOKIA' starting.
The queue manager is associated with installation 'Installation1'.
5 log records accessed on queue manager 'NOKIA' during the log replay phase.
Log replay for queue manager 'NOKIA' complete.
Transaction manager state recovered for queue manager 'NOKIA'.
WebSphere MQ queue manager 'NOKIA' started using V8.0.0.4.



##################Display MQ Status##########################

-bash-4.2$ dspmq
QMNAME(NOKIA)   


                                          STATUS(Running)



############Run MQ Command compiler##########################


-bash-4.2$ runmqsc NOKIA
5724-H72 (C) Copyright IBM Corp. 1994, 2015.
Starting MQSC for queue manager NOKIA.




##########Define Listener #####################

 4 : DEFINE LISTENER(NOKIA_LSTR) TRPTYPE(TCP) PORT(32323)
AMQ8626: WebSphere MQ listener created.
START 


#############Start Listener #####################

  6 : START LISTENER(NOKIA_LSTR)
AMQ8021: Request to start WebSphere MQ listener accepted.
   

 ############Display Listener Status####################

DISPLAY LSSTATUS(*)  
     8 : DISPLAY LSSTATUS(*)
AMQ8631: Display listener status details.
   LISTENER(NOKIA_LSTR)                    STATUS(RUNNING)
   PID(14719)                           

###########Define Remote Queue#############

DEFINE QR(RemoteQueue)            
     1 : DEFINE QR(RemoteQueue)
AMQ8006: WebSphere MQ queue created.


#####################Define XMITQ ############

 
    14 : DEF QL(XMITQ) USAGE(XMITQ) TRIGGER TRIGTYPE(FIRST) INITQ(INITQ)
AMQ8006: WebSphere MQ queue created.



###################Define INITQ##################


DEF QL(INITQ)
    15 : DEF QL(INITQ)
AMQ8006: WebSphere MQ queue created.


################Define Sender Channel######################

DEF CHL(NOKIASAMSUNG) CHLTYPE(SDR) XMITQ(XMITQ) CONNAME('192.168.122.49(1555)')  
    16 : DEF CHL(NOKIASAMSUNG) CHLTYPE(SDR) XMITQ(XMITQ) CONNAME('192.168.122.49(1555)') 
AMQ8014: WebSphere MQ channel created.

Note: Channel name should be the same at both sender and receiver side in Distribution setup 
IP Address/Port is given for Receiver side
Use Hostname instead of IP Address


############Display all Queue details######################3


DISPLAY QR(*)
    17 : DISPLAY QR(*)
AMQ8409: Display Queue details.
   QUEUE(REMOTEQUEUE)                      TYPE(QREMOTE)


###############Alter Remote Queue #########################

### To associate the transmission or XMIT Queue to Remote Queue 

ALTER QR(REMOTEQUEUE) RNAME(LOCAL) RQMNAME(SAMSUNG) XMITQ(XMITQ)


DISPLAY QR(REMOTEqUEUE)
AMQ8409: Display Queue details.
   QUEUE(REMOTEQUEUE)                      TYPE(QREMOTE)
   ALTDATE(2017-06-14)                     ALTTIME(16.02.49)
   CLUSNL( )                               CLUSTER( )
   CLWLPRTY(0)                             CLWLRANK(0)
   CUSTOM( )                               DEFBIND(OPEN)
   DEFPRTY(0)                              DEFPSIST(NO)
   DEFPRESP(SYNC)                          DESCR( )
   PUT(ENABLED)                            RQMNAME( )
   RNAME( )                                SCOPE(QMGR)
   XMITQ( )                             




Receiver Side Configuration Steps 

1. Create a Queue Manager
2. Create a listener , start it 
3. Create a Local queue
4. Create a receiever channel
5. Run the AMQ put/get commands to send or receive the messages 


###########Create a Queue Manager & Start it at Receiver Side ##############

-bash-4.2$ crtmqm SAMSUNG
There are 90 days left in the trial period for this copy of WebSphere MQ.
WebSphere MQ queue manager created.
Directory '/var/mqm/qmgrs/SAMSUNG' created.
The queue manager is associated with installation 'Installation1'.
Creating or replacing default objects for queue manager 'SAMSUNG'.
Default objects statistics : 79 created. 0 replaced. 0 failed.
Completing setup.
Setup completed.

-bash-4.2$ dspmq
QMNAME(NOKIA)                                             STATUS(Running)
QMNAME(SAMSUNG)                                           STATUS(Ended immediately)

-bash-4.2$ strmqm SAMSUNG
There are 90 days left in the trial period for this copy of WebSphere MQ.
The system resource RLIMIT_NOFILE is set at an unusually low level for WebSphere MQ.
WebSphere MQ queue manager 'SAMSUNG' starting.
The queue manager is associated with installation 'Installation1'.
5 log records accessed on queue manager 'SAMSUNG' during the log replay phase.
Log replay for queue manager 'SAMSUNG' complete.
Transaction manager state recovered for queue manager 'SAMSUNG'.



##########Display QR Details #############


dis qr(*) all
     1 : dis qr(*) all
AMQ8409: Display Queue details.
   QUEUE(REMOTEQUEUE)                      TYPE(QREMOTE)
   ALTDATE(2017-06-14)                     ALTTIME(16.18.55)
   CLUSNL( )                               CLUSTER( )
   CLWLPRTY(0)                             CLWLRANK(0)
   CUSTOM( )                               DEFBIND(OPEN)
   DEFPRTY(0)                              DEFPSIST(NO)
   DEFPRESP(SYNC)                          DESCR( )
   PUT(ENABLED)                            RQMNAME(SAMSUNG)
   RNAME(LOCAL)                            SCOPE(QMGR)
   XMITQ(XMITQ)                         
AMQ8409: Display Queue details.
   QUEUE(SYSTEM.DEFAULT.REMOTE.QUEUE)      TYPE(QREMOTE)
   ALTDATE(2017-06-14)                     ALTTIME(15.57.51)
   CLUSNL( )                               CLUSTER( )
   CLWLPRTY(0)                             CLWLRANK(0)
   CUSTOM( )                               DEFBIND(OPEN)
   DEFPRTY(0)                              DEFPSIST(NO)
   DEFPRESP(SYNC)                          DESCR( )
   PUT(ENABLED)                            RQMNAME( )
   RNAME( )                                SCOPE(QMGR)
   XMITQ( )                             
end
     2 : end




### Run command prompt to issue MQSC Commands #############

-bash-4.2$ runmqsc SAMSUNG
5724-H72 (C) Copyright IBM Corp. 1994, 2015.
Starting MQSC for queue manager SAMSUNG.


#########Define Local Queue #############

def ql(LOCAL)
     1 : def ql(LOCAL)
AMQ8006: WebSphere MQ queue created.


########Define Receiver Channel ############

       : 
def chl(NOKIASAMSUNG) chltype(RCVR) 
     2 : def chl(NOKIASAMSUNG) chltype(RCVR) 
AMQ8014: WebSphere MQ channel created.


##########Define Listener at Receiver side)


def lstr(SAMSUNG_LSTR) trptype(TCP) port(32324)
     3 : def lstr(SAMSUNG_LSTR) trptype(TCP) port(32324)
AMQ8626: WebSphere MQ listener created.

       



#### Start/Stop Channels###############

stop chl(NOKIASAMSUNG)
     3 : stop chl(NOKIASAMSUNG)
AMQ8019: Stop WebSphere MQ channel accepted.

       : 
start chl(NOKIASAMSUNG) 
     4 : start chl(NOKIASAMSUNG)
AMQ8018: Start WebSphere MQ channel accepted.




##########Display Channel Status Details###################

 5 : dis chs(*)
AMQ8417: Display Channel Status details.
   CHANNEL(NOKIASAMSUNG)                   CHLTYPE(SDR)
   CONNAME(9.184.56.149(15152))            CURRENT
   RQMNAME(SAMSUNG)                        STATUS(RUNNING)
   SUBSTATE(MQGET)                         XMITQ(XMITQ)

       : 

       : 
 

 


##############Putting the Messages to Remote Queue############
Navigate to  /opt/mqm/samp/bin

-bash-4.2$ ./amqsput REMOTEQUEUE NOKIA
Sample AMQSPUT0 start
target queue is REMOTEQUEUE
Hi ABC

Sample AMQSPUT0 end