You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »


Installation

Java Installation.

Setting Environment Variable:

  1. export JAVA_HOME=<Location of Java SDK install folder.>
  2. export PATH=$JAVA_HOME/bin:$PATH

ANT Installation.

Setting Environment Variable:

  1. export ANT_HOME=<Location of ANT install folder.>
  2. export PATH=$ANT_HOME/bin:$PATH

Set MCS_HOME

  1. export MCS_HOME=<Location of MCS Install Directory>
  2. Also source $MCS_HOME/setenv.sh

Tomcat Setup (5.5)

  1. export CATALINA_OPTS=-Dmcs.home=$MCS_HOME.

Build configuration

  1. In $MCS_HOME build.xml file
    Set the tomcat.dir property <property name="tomcat.dir" value="<location-where-tomcat-is-installed>" />

Axis2 (1.4.x) Installation.

Setting Environment Variable:

  1. export AXIS2_HOME=$lt;Location of Axis download folder.>
  2. export PATH=$AXIS2_HOME/bin:$PATH

Setting Classpath

  1. export CLASSPATH= .:$AXIS2_HOME/lib/activation-1.1.jar:$AXIS2_HOME/lib/axiom-api-1.2.7.jar:$AXIS2_HOME/lib/axiom-impl-1.2.7.jar:$AXIS2_HOME/lib/axis2-adb-1.4.1.jar:$AXIS2_HOME/lib/axis2-kernel-1.4.1.jar:$AXIS2_HOME/lib/geronimo-stax-api_1.0_spec-1.0.1.jar:$AXIS2_HOME/lib/XmlSchema-1.4.2.jar:$AXIS2_HOME/lib/backport-util-concurrent-3.1.jar:$AXIS2_HOME/lib/neethi-2.0.4.jar:$AXIS2_HOME/lib/wstx-asl-3.2.4.jar:$AXIS2_HOME/lib/commons-httpclient-3.1.jar:$AXIS2_HOME/lib/commons-codec-1.3.jar:$AXIS2_HOME/lib/wsdl4j-1.6.2.jar:$MCS_HOME/lib/mcs-client.jar:$AXIS2_HOME/lib/log4j-1.2.15.jar:$AXIS2_HOME/lib/commons-logging-1.1.1.jar:$CLASSPATH

MYSQL Classpath

  1. cp <Path to MYSQL JDBC Type 4 Driver>.jar to $CATALINA_HOME/common/lib

Apache Database Connection Pool

  1. cp $MCS_HOME/lib/commons-*.jar $CATALINA_HOME/common/lib

Compiling MCS

  1. cd $MCS_HOME
  2. ant compile

Deploying the Service.

  1. ant deploy
  2. Restart the Tomcat Server.

Building Client JAR

  1. ant client-jar

Changing the MCS Properties file. ($MCS_HOME/etc/mcs.properties)

  1. Set mcs.rest.serviceurl to the URL of the deployed webservice.
  2. Set mcs.db.host to the hostname or IP of the machine hosting the database.
  3. Set mcs.db.user to the database user name.
  4. Set mcs.db.pass to the database password.
  5. Set transport-protocol to https if using secured transport, http otherwise.
  6. Set port to the port number of Tomcat server on which SSL has been enabled.
  7. certificate.type to type of certificate
  8. certificate.path Path to certificate file.
  9. certificate.password Password to access certificate file.
  10. Optionally specify values for trustore type, file, password.

Security Setup

$CATALINA_HOME/conf/server.xml

  1. <Connector acceptCount="100" clientAuth="want" disableUploadTimeout="true" enableLookups="false" maxHttpHeaderSize="8192" maxSpareThreads="75" maxThreads="150" minSpareThreads="25" port="8443" scheme="https" secure="true" sslProtocol="TLS" keystoreFile="Path-To-KeyStore-File" keystorePass="Password-Of-KeyStore-File" truststoreFile=" Path-To-KeyStore-File " truststorePass=" Password-Of-KeyStore-File" />

Note: Trust Store attributes are optional.

Importing an existing key and certificate in a key store

The Key tool utility does not allow importing existing certificates into a key store.
To import existing key and certificate in a key store we have provided a utility code.

1. Convert the certificate and key file in to DER format using following commands.

openssl pkcs8 -topk8 -inform PEM -in key.pem -outform DER -nocrypt -out key.der
openssl x509 -in  -inform PEM -out  -outform DER

2. Run the server utility as follows

java edu.isi.pegasus.mcs.common.util.ServerKeystoreBuilder

The utility creates a new key store file at the location.

  • No labels