This blog post explains how to deploy WSO2-BPS in Apache Tomcat servlet container with a few configuration steps. Even for any other WSO2 product these steps will be compatible.
- Ubuntu 10.04
- Java version "1.6.0_21"
- Extract the downloaded distribution of wso2bps-2.0.2 into a directory.
- Copy repository and resources directories in to a new folder. Say it is carbon-repo (i.e:- /opt/temp-svn/products/carbon-repo)
- Extract the downloaded distribution of apache-tomcat-6.0.32 into a directory, CATALINA_HOME.
- Go to CATALINA_HOME\webapps directory and create a new folder, bps
- Copy wso2bps-2.0.2/lib/core/WEB-INF to CATALINA_HOME/webapps/bps
- We need to enable https in tomcat. Therefore, edit CATALINA_HOME\conf\server.xml by adding the following entry.
<connector maxhttpheadersize="8192" port="8443" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" disableUploadTimeout="true" acceptCount="100" scheme="https" secure="true" SSLEnabled="true" clientAuth="false" sslProtocol="TLS" keystoreFile = "/opt/temp-svn/products/carbon-repo/resources/security/wso2carbon.jks" keystorePass="wso2carbon" />
- Make sure to give the exact location of wso2carbon.jks as highlighted above.
- We have done the configurations required in tomcat. Now, we must do the necessary configurations in a set of configuration files shipped with WSO2 BPS. We will update carbon.xml, axis2.xml, registry.xml and user-mgt.xml which can be found at carbon-repo\repository\conf directory.
- First, open carbon.xml and update the ServerURL and WebContextRoot elements as follows. It is required to change the WebContextRoot to match with the web application directory name we have given in step2. In our case, it is bps.
- Note that we have configured tomcat to run on 8443 port. Save and close carbon.xml.
- Open registry.xml and update DB URL as follows.
<dbConfig name="wso2registry"> <url>jdbc:h2:/opt/temp-svn/products/carbon-repo/repository/database/WSO2CARBON_DB</url> <userName>wso2carbon</userName> <password>wso2carbon</password> <driverName>org.h2.Driver</driverName> <maxActive>50</maxActive> <maxWait>60000</maxWait> <minIdle>5</minIdle> </dbConfig>
- Open user-mgt.xml and update database URL as follows.
- Make sure to specify the absolute path of the WSO2CARBON_DB in both of the above elements.
- Open axis.xml and change the ports in the http and https transport receivers as follows.
<transportReceiver name="http" class="org.wso2.carbon.core.transports.http.HttpTransportListener"> <parameter name="port">8080</parameter> </transportReceiver> <transportReceiver name="https" class="org.wso2.carbon.core.transports.http.HttpsTransportListener"> <parameter name="port">8443</parameter> </transportReceiver>
- Add the jars included in CARBON_HOME/lib/endorsed to CATALINA_HOME/lib.
- Now, open a new command window and change the directory to CATALINA_HOME/bin.
- Define an environment variable called CARBON_HOME and set the path to your carbon-repo directory.
- Start the Tomcat server and access https://localhost:8443/bps/services/ in browser.