Friday, March 15, 2013

Installing Moab Web Services on a Unix box

1) Install Tomcat
yum install tomcat6
2) Install 64-bit version of Oracle Java SE6 JRE.
sh jre-6u37-linux-x64-rpm.bin
rm -f /usr/bin/java
ln -s /etc/alternatives/java /usr/bin/java
alternatives --install /usr/bin/java java /usr/java/jre1.6.0_37/bin/java 500
alternatives --set java /usr/java/jre1.6.0_37/bin/java
3) Create mws home directories and sub-directories
mkdir -p /opt/mws/etc /opt/mws/hooks /opt/mws/plugins /opt/mws/log
chown -R tomcat:tomcat /opt/mws # Depending on your OS, the Tomcat username might be
tomcat6.
chmod -R 555 /opt/mws
chmod u+w /opt/mws/plugins /opt/mws/log
4) Extract mws tarball to a tempory directory.
mkdir /tmp/mws-install
cd /tmp/mws-install
tar xvzf $HOME/Downloads/mws-.tar.gz
cd /tmp/mws-install/mws-
5) Set up the MWS configuration file.
 i) In the extracted MWS directory are two sample configuration files:
   mws-config-cloud.groovy and mws-config-hpc.groovy
   mws-config-cloud.groovy provides sample configuration for the Moab Cloud Suite
   mws-config-hpc.groovy provides sample configuration for the Moab HPC Suites

ii) Choose the correct file for your suite, rename it to mws-config.groovy, and copy it to /opt/mws/etc.

iii) Give the Tomcat user read access to /opt/mws/etc/mws-config.groovy. 6) Add the following line to the end of /etc/tomcat6/tomcat6.conf.
CATALINA_OPTS="-DMWS_HOME=/opt/mws -Xms256m -Xmx3g -XX:MaxPermSize=384m"
7) Start Tomcat and deploy mws.war.
chkconfig tomcat6 on
service tomcat6 stop
cp /tmp/mws-install/mws-/mws.war /var/lib/tomcat6/webapps
service tomcat6 start
8) Visit http://localhost:8080/mws/ in a web browser to verify that MWS is running. You will see some sample queries and a few other actions.

9) Log into MWS to verify that the MWS credentials are working. The credentials are the values of auth.defaultUser.username and auth.defaultUser.password that you set above.

No comments: