Versions
- CentOS 6.3
- Oracle Java JDK 1.6
- WSO2 Data Services Server 3.0.1
Prerequisties
Install
1. Download
Download Data Services Server from WSO2 website: http://wso2.com/products/data-services-server/
Note: can’t link directly since currently requires filling out a form to download.
2. Extract
1 |
unzip wso2dss-3.0.1.zip |
Note: update version as required
2. Move
1 2 |
sudo mv wso2dss-3.0.1 /usr/lib sudo ln -s /usr/lib/wso2dss-3.0.1 /usr/lib/wso2dss |
Configure
1. Create wso2 user if missing
1 |
sudo useradd --system --user-group wso2 |
2. Update permissions
1 2 |
sudo chown -R wso2:wso2 /usr/lib/wso2dss-3.0.1 sudo chown wso2:wso2 /usr/lib/wso2dss |
3. Create service script /etc/init.d/wso2dss
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
#!/bin/sh # # chkconfig: 2345 80 80 # # Bash script to run wso2server.sh as a service # # Note: Normal env variables are discarded by service. So must export JAVA_HOME here, see http://serverfault.com/questions/374404/service-command-and-environment-variables export JAVA_HOME=/usr/java/latest WSO2_HOME=/usr/lib/wso2dss WSO2_DAEMON=bin/wso2server.sh WSO2_USER=wso2 START_OPTIONS=start STOP_OPTIONS=stop start() { echo "Starting WSO2 Data Services Server..." su --preserve-environment $WSO2_USER -c "cd $WSO2_HOME && $WSO2_DAEMON $START_OPTIONS" return 0 } stop() { echo "Stopping WSO2 Data Services Server..." su --preserve-environment $WSO2_USER -c "cd $WSO2_HOME && $WSO2_DAEMON $STOP_OPTIONS" return 0 } case "$1" in start) start ;; stop) stop ;; restart) stop start ;; *) echo $"Usage: $0 {start|stop|restart}" exit 1 esac exit $? |
Note: the script hard codes JAVA_HOME, but this can be deferred to the /etc/sysconfig/wso2<product> script (which you must create) if desired. Note that the normal /etc/profile.sh is *not* run for system accounts.
TODO: find better way of setting JAVA_HOME, can’t execute /etc/profile or /etc/profile.d/java.sh directly
4. Make it executable
1 |
sudo chmod +x /etc/init.d/wso2dss |
5. Start service
1 |
sudo service wso2dss start |
6. Start service on boot
1 |
sudo chkconfig wso2dss on |
7. Open the following ports as required:
- 9443 – carbon admin and https port used to access data services
- 9763 – http port used to access data services
Verify
Watch wso2dss logs:
1 |
sudo tail -F /usr/lib/wso2dss/repository/logs/wso2carbon.log |
Should see the following:
1 2 3 4 5 6 7 8 |
... TID: [0] [DSS] [2013-03-29 11:04:23,272] INFO {org.wso2.carbon.core.internal.permission.update.PermissionUpdater} - Permission cache updated for tenant -1234 {org.wso2.carbon.core.internal.permission.update.PermissionUpdater} TID: [0] [DSS] [2013-03-29 11:04:25,293] INFO {org.wso2.carbon.core.transports.http.HttpsTransportListener} - HTTPS port : 9443 {org.wso2.carbon.core.transports.http.HttpsTransportListener} TID: [0] [DSS] [2013-03-29 11:04:25,293] INFO {org.wso2.carbon.core.transports.http.HttpTransportListener} - HTTP port : 9763 {org.wso2.carbon.core.transports.http.HttpTransportListener} TID: [0] [DSS] [2013-03-29 11:04:26,587] INFO {org.wso2.carbon.core.init.JMXServerManager} - JMX Service URL : service:jmx:rmi://localhost:11111/jndi/rmi://localhost:9999/jmxrmi {org.wso2.carbon.core.init.JMXServerManager} TID: [0] [DSS] [2013-03-29 11:04:26,618] INFO {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} - Server : WSO2 Data Services Server-3.0.1 {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} TID: [0] [DSS] [2013-03-29 11:04:26,618] INFO {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} - WSO2 Carbon started in 23 sec {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} TID: [0] [DSS] [2013-03-29 11:04:26,975] INFO {org.wso2.carbon.ui.internal.CarbonUIServiceComponent} - Mgt Console URL : https://10.50.76.30:9443/carbon/ {org.wso2.carbon.ui.internal.CarbonUIServiceComponent} |
Visit your new Carbon website: https://<hostname>:9443/carbon/
Initial login:
- Username: admin
- Password: admin
Important Note: if are you going to want to configure API Manager to use LDAP for logins, don’t log in using the default admin account!