Installation and Build Guide to WSO2 Registry v1.1 on Windows and Ubuntu
Submitted on July 11, 2008 - 23:00. Story : Project :
Governance is key for a successful SOA deployment, in which, business agility is a key measurement. The WSO2 Registry offers comprehensive government capabilities for enterprise SOA deployments. This tutorial by Ayanthi Anandagoda is a step-by-step guide to installing the WSO2 Registry in Windows and Ubuntu operating systems. Additionally, the tutorial also provides steps to building the Registry product using Apache Maven.
Introduction
The WSO2 Registry combines features of traditional SOA registry (SOA governance) together with capabilities of a Web 2.0 registry (collaboration). The WSO2 Registry is a fully versioned and secured repository for storing any kind of resources ranging from WSDL files to Microsoft Office documents.
Coupled with traditional registry features such as user management, life cycle management, versioning and dependency management, the Registry's Web 2.0 like features include community features such as tagging, commenting and rating. The WSO2 Registry can be used with its Web user interface or alternative using its API (Application Programming Interface), through which other applications can be made to access features available in the Registry core. Additionally, the WSO2 Registry can also be used as a remote content repository for other applications. Refer this[1] blog post to find out more and follow up this link[2] to read more about the latest offerings of the WSO2 Registry v1.1 release.
About Windows and Ubuntu
The Windows operating system is a product developed and maintained by the Microsoft.
Ubuntu, a derivation of Debian, is probably the most popular of the many Linux distributions. The African origins of the term Ubuntu refers to "humanity towards others" or more specifically "I am who I am because of who we all are". With a new release every six months, Ubuntu is community developed free software.
With that brief introduction to the WSO2 Registry, Windows and the Ubuntu operating system, let us now focus installing and building the WSO2 Registry product on these 2 very popular platforms.
Table of Contents
Pre-requisites (applies to the Installation of the WSO2 Registry product on Either Operating System):
- Apache Tomcat application server. Find the latest release of the Apache Tomcat application server at Apache Tomcat Project Home Page.
The Registry works on Apache Tomcat v1.5, although, WSO2 recommends Apache Tomcat v1.6. - Sun JDK 1.5 or higher. Find the latest release of the JDK installation at Sun Developer Network - Java SE Downloads.
Part (1) - Installation Steps on the Windows Platform
(1.a) Download and Install JDK on Windows
- Download JDK v1.5 or higher. The latest download can be found at the Sun site
- Ensure the JAVA_HOME variable is set to C:\Program Files\Java\<version> (in this demo I've used jdk1.5.0_13 and hence the path is C:\Program Files\java\jdk1.5.0_13). Set the environment variable by going through My Computer > Properties > Advance > Environment Variables.
(1.b) Download and Install Apache Tomcat on Windows
If you you haven't got it already, follow up the steps given below to ensure a successful installation of the Tomcat application server:
- Download Apache Tomcat 1.5 or higher. Get the latest download from the Apache site.
- Extract the zip archive to a desired destination folder. For the purpose of the illustration I have used c:/servers as the destination folder.
- Start Tomcat by going to the Tomcat installation's bin folder and executing the following command: startup.bat
- Point your Web browser to the following URL: http://localhost:8080/. Server home page should load on your browser.
Note: I would advice you to confirm the correct installation of the application server by simply executing a sample applications listed on the Tomcat server's home page. Make sure to do this as the home page display on the browser alone is not adequate to confirm the proper execution of the Tomcat server. Previously cached content could actually make you belive the server is running when actually it is not.

(1.c) Download and Execute Registry 1.1 on Windows
- Download the WSO2 Registry vv1.1 from the WSO2 Oxygen Tank.
- Drop the war file in to the webapps folder (apache-tomcat-6.0.16\webapps) of your Tomcat installation.
- This will deploy the Registry application instantly.
The following diagram also shows you, how the webapps directory looks like after a successful deployment of the WSO2 Registry.
- You are now able to browse the Registry application using its intuitive Web user interface simply by pointing your Web browser to the following URL: http://localhost:8080/wso2registry.
Make sure to log into the application using the login functionality made available on the top right hand side of the initial screen as most functionality is otherwise disabled. Default log in credentials are admin/admin
You may use the Registry it to create, browse, tag, comment or version resources either as a standalone application or as an embedded product of another application.
Part (2) - Installation Steps for the Ubuntu Platform
(2.a) Download and Install JDK 1.5 or higher on Ubuntu
- Type sudo apt-get install sun-java6-jdk to install the latest version of JDK on your machine.
- Ensure the JAVA_HOME variable is set to /usr/lib/jvm/java-6-sun. You could do this by wither typing export JAVA_HOME=/usr/lib/jvm/java-6-sun on your console or by add it to your profile.
Use vim ~/.bashrc to edit profile and source .bashrc to refresh settings on your console instance without having to log out and logging back again..
(2.b) Download and Install Apache Tomcat on Ubuntu
If you haven't got already, follow the steps given below in order to successfully install the Tomcat application server. To confirm Java exists, use the dpkg -l command.
dpkg -l | grep sun-java should tell you if Java is properly installed on your machine. Remember to make sure that Java is installed properly if you haven't done so already (refer step (2.a)
- Download the latest version of the Apache Tomcat server from the Apache site.
- Extract the zip archive to a desired destination folder. Use the unzip command for this purpose.
E.g. type unzip apache-tomcat-6.0.16.zip and the archive will be extracted to a apache-tomcat-6.0.16 file within the current directory. Alternatively, use the tar command to extract a tar file. Try xvzf apache-tomcat-6.0.14.tar.gz for this purpose.
Use mv apache-tomcat-6.0.16 <destination> to move extracted files to a destination folder of your desire. - Start Tomcat by going to the Tomcat installation's bin folder and executing the following command: ./startup.sh
Note: You could confirm the correct installation of the Tomcat Application server by executing a sample applications listed on the Tomcat server's home page. Make sure to do this as the home page display on the browser alone is not adequate to confirm the proper execution of the Tomcat server. Previously cached content could actually make you belive the server is running when actually it is not.
(2.b) Download and Execute Registry v1.1 on Ubuntu
- Download WSO2 Registry v1.1 war distribution from here. Download WSO2 Registry v1.1
- Now, drop the war file into the webapps folder (apache-tomcat-6.0.16\webapps), of your Tomcat installation.
- This will successfully deploy the Registry application instantly.
Note the addition of the wso2registry folder. - You are now able to browse the WSO2 Registry application using its intuitive Web user interface by pointing your Web browser to the following URL: http://localhost:8080/wso2registry.
Make sure to log into the application using the login functionality made available on the top right hand side of the initial screen as most functionality is otherwise disabled.
You may use the Registry it to create, browse, tag, comment or version resources either as a standalone application or as an embedded product of another application.
Part (3) - Building the Project with Apache Maven
In the above two scenarios, we used an already built project war file to deploy the Registry product. An alternative approach is to build the .war file yourself using the Maven tool. The option of building a project is often useful when developers need to try bleeding end technology before such technology hits the public. Apache Maven is a Java-based build and dependency management tool (an alternative to Apache Ant) that can be used for the purpose. Maven advocates a standard life cycle, and a directory layout together with extensive report/documentation.
Follow the steps give below in order to build the WSO2 Registry war file on Windows and Ubuntu operating systems. Make sure to get a SVN checkout of the Registry project trunk as the first thing.
(3.a) Pre-requisites for Building with Maven:
- JDK installation with the JDK_HOME variable configured.
JDK v1.4 or higher is recommended. Ensure JAVA_HOME environment variable points to the JDK installation folder.
Windows: Do this by going through My Computer > Properties > Advance > Environment Variables
Ubuntu:Ensure the JAVA_HOME variable is set to /usr/lib/jvm/java-6-sun. Type export JAVA_HOME=/usr/lib/jvm/java-6-sun on the console or add it to the profile.
Use vim ~/.bashrc to edit profile and source .bashrc to refresh settings on your console instance without having to log out. - Apache Maven Installation. Download the latest Maven distribution from the Apache Maven Web site.
- Get an SVN checkout of the Registry trunk that's available here: https://svn.wso2.org/repos/wso2/trunk/registry
(3.b) Windows Commands to Build the Project
- Run unzip maven-2.0.zip to unpack the archive. This will create a folder named maven-2.0.
Move the folder to your required destination by using the move command. - Use set PATH="c:\program files\maven-2.0\bin";%PATH% to update the PATH variable.
- Use mvn -v to confirm the correct installation of the Maven software.
- Go to the SVN checkout folder of the Registry trunk to run mvn clean install, to start building the project.
Look for the wso2registry.war file in \modules\webapps\target directory.
(3.c) Ubuntu Commands to Build the Project
- Use java -version command to find out the the existence of Java in your machine.
- Use tar -xvzf <filename> to extract the archive.
For e.g. tar -xvzf apache-maven-2.0.9-bin.tar.gz This will create a folder named apache-maven-2.0.9-bin.
Use mvn -v to confirm the correct installation of the Maven software. - Set the path variable to point to the bin folder by adding Export PATH=/usr/local/maven-2.0/bin:$PATH to the .bashrc profile file.
Use the command source .bashrc to renew settings on your console instance without having to log out and come back. - Get an the SVN check out of the Registry product trunk and then run mvn clean install to start building the project.
Look for the wso2registry.war files in the \modules\webapps\target directory.
Note: Use pwd on Ubuntu in order to display the current location on an Ubuntu console wondow.
References
Resources
- WSO2 Registry - Project Home Page
- WSO2 Registry - Latest Download Page
- WSO2 Registry v1.1 - Documentation Index
- Apache Tomcat - Project Home Page
- WSO2 Registry User Mailing List
- WSO2 Registry Developer Mailing List
- Report Issues on WSO2 Registry
Author
Ayanthi Anandagoda is Manager - Content Development at WSO2. ayanthi at wso2 dot com
- by ayanthi
- Login or register to post comments
- Printer friendly version
- 970 reads










