Sie sind auf Seite 1von 6

Published on WSO2 Oxygen Tank (http://wso2.

org)

Home > Stories > How to Deploy WSO2 G-reg 3.6.0 on WebLogic 10.3

How to Deploy WSO2 G-reg 3.6.0 on WebLogic


10.3
By charithak
Created 2011-01-17 16:50

WSO2 Governance Registry [1] can be deployed on most of the popular application servers with a simple
set of configuration steps. In this post, we will look into the steps of deploying WSO2 Governance Registry
3.6.0 (WSO2 G-reg 3.6.0) on Oracle WebLogic application server.

Applies To
WSO2 Governance Registry 3.6.0
Oracle WebLogic Server 10.3.3

Table of Contents
We will look into the following topics within this tutorial.
1. Preparing WebLogic server
2. Building a deployable artifact
3. Configuring SSL on WebLogic
4. Updating WSO2 Governance Registry configuration files
5. Installing WSO2 Governance Registry on WebLogic

1. Preparing WebLogic Server

First, we should create a new domain in WebLogic server so that we can isolate WSO2 Governance
Registry deployment from the others. Create a new weblogic domain by running config.sh {bat} located at
WebLogic_HOME/wlserver_10.3/common/bin directory. Let's assume the new domain is greg_domain.

Access your weblogic domain direcrtory and start weblogic (Go to


WebLogic_HOME/user_projects/domains/greg_domain/bin and run startWebLogic.cmd).

2. Building a deployable artifact

Now, we need to build an artifact from WSO2 Governance Registry binary distribution so that it can be
deployed on WebLogic server. Download WSO2 Governance Registry-3.6.0 from
wso2.org/downloads/governance-registry [2]. Extract the downloaded .zip into a directory. Copy repository
and resources directories in to a new folder. Hereafter, we will refer to this new directory as greg-repo, i.e.
/home/charitha/governance/greg-repo.

Also, create a new directory, greg, and copy the WEB-INF directory located at the lib/core directory of the
downloaded WSO2 Governance Registry-3.6.0 to the greg directory. Now, your greg-repo should have the
following sub directories.

- repository

- resources

- greg

The greg directory will be used as the webapp root and we will point to that during the installation process.
In order to enable WSO2 Carbon logging inside WebLogic, you should copy log4j.properties file in the
extracted WSO2 Governance Registry-3.6.0 directory to greg-repo\greg\WEB-INF\classes. Also, make
sure to copy xalan-*.jar, xercesImpl-*.jar and xml-apis-*.jar from the lib/endorsed directory of the extracted
WSO2 Governance Registry binary distribution to weblogic endorsed directory before you start WebLogic
Server.

3. Configuring SSL on WebLogic

We must enable SSL in weblogic server since the interactions with WSO2 Governance Registry will have
happened through HTTPS. Login to weblogic administration console (you should have configured
username and password for admin console when creating your WebLogic domain) and go to Environment
--> Servers. Then, select AdminServer.
Click on the Keystores tab. Configure Keystores as shown below.
Keystore = Custom Identity & Custom Trust
Custom Identity Keystore = /home/charitha/governance/greg-repo/resources/security
Custom Identity Keystore Type = JKS
Custom Identity Keystore Passphrase = wso2carbon
Confirm Custom Identity Keystore Passphrase = wso2carbon
Custom Trust Keystore = /home/charitha/governance/greg-repo/resources/security/ws
Custom Trust Keystore Type = JKS
Custom Trust Keystore Passphrase = wso2carbon
Confirm Custom Trust Keystore Passphrase = wso2carbon

Now, select SSL tab and enter the following values.

Identity and trust locations = keystores


Private Key Alias = wso2carbon
Private Key Passphrase = wso2carbon
Confirm Private Key Passphrase = wso2carbon

Save the configuration and go to the General tab. Select the checkbox next to "SSL listen port enabled."
Now, we have configured the necessary changes to enable SSL on weblogic. Let's continue with deploying
WSO2 Governance Registry on weblogic.

4. Updating WSO2 Governance Registry configuration files


WSO2 Governance Registry is provided with a set of configuration files in GREG_HOME (root of the
binary distribution)/repository/conf directory, which can be used to update the ports, database settings,
web application context roots, etc. We will update carbon.xml, axis2.xml, registry.xml and user-mgt.xml
which can be found at the above greg-repo/repository/conf directory.

First, open carbon.xml and update the ServerURL element as follows.

<ServerURL>https://localhost:7002/greg/services/</ServerURL>

Note that we have configured weblogic to run on 7002 port.


Since we deploy WSO2 Governance Registry on WebLogic server on non-root webContext, update the
WebContextRoot element as follows.

<WebContextRoot>/greg</WebContextRoot> Save and close carbon.xml.

Open registry.xml and update DB URL as follows.

<url>jdbc:h2:/home/charitha/governance/greg-repo/repository/database/WSO2CARBON_DB

Now, open user-mgt.xml and update database URL as follows.

<url>jdbc:h2:/home/charitha/governance/greg-repo/repository/database/WSO2CARBON_DB

Make sure to specify the absolute path of the WSO2CARBON_DB in both of the above elements.

We must change the http and https ports in Transports section of axis2.xml as follows.

<transportReceiver name="http"
class="org.wso2.carbon.core.transports.http.HttpTransportListener">
<parameter name="port">7001</parameter>
</transportReceiver>
<transportReceiver name="https"
class="org.wso2.carbon.core.transports.http.HttpsTransportListener">
<parameter name="port">7002</parameter>
</transportReceiver>

5. Installing WSO2 Governance Registry on WebLogic

We have completed the required configurations and, now, are ready to deploy WSO2 Governance Registry
on weblogic.

First, shutdown the weblogic server instance if it is still running.

Open a new command window or shell and change the directory to


WebLogic_HOME/user_projects/domains/greg_domain/bin.

Define an environment variable called CARBON_HOME and set the path to your greg-repo directory.

In MS Windows; set CARBON_HOME=C:\governance\greg-repo.


In Linux; export CARBON_HOME=/home/user/governance/greg-repo.

Run startWebLogic.cmd.

Once the server is started successfully, log in to weblogic administration console using
https://localhost:7002/console.

Then, go to the Summary of Deployments page and select Install.

Locate the deployment root by selecting /home/charitha/governance/greg-repo/greg directory.

The web app root directory will be shown with a radio button option as follows.

Click on next to proceed through the wizard and continue with the default settings. Once the deployment is
successful, save the configuration and select start --> servicing all requests.

Now, we are done with the deployment.

You can access the management console using https:\\localhost:7002\greg\carbon

Author:

Charitha Kankanamge
Senior Technical Lead and Manager - Quality Assurance; WSO2, Inc.

charitha@wso2.com

Knowledge Base Introductory Governance SOA


© 2010 WSO2 Inc.
footer
Licenses
Privacy Policy
Terms of Use
Community Guidelines
Feedback
wso2.com
__compete_code = 'a56ed378f1a9259cd4db80722cbf2623'; (function () { var s =
document.createElement('script'), d = document.getElementsByTagName('head')[0] ||
document.getElementsByTagName('body')[0], t = 'https:' == document.location.protocol ?
'https://c.compete.com/bootstrap/' : 'http://c.compete.com/bootstrap/'; s.src = t + __compete_code +
'/bootstrap.js'; s.type = 'text/javascript'; s.async = 'async'; if (d) { d.appendChild(s); } }());

Source URL: http://wso2.org/library/knowledge-base/2011/01/deploy-wso2-greg-360-weblogic-103

Links:
[1] http://wso2.org/library/governance-registry
[2] http://wso2.org/downloads/governance-registry

Das könnte Ihnen auch gefallen