0. make sure a copy cipres library is installed and running on the same
machine where you will be installing the web application
make sure another copy of the cipres library is installed and running
on the cluster machine.
see http://phylo.org/sub_sections/software for instructions on building cipres library
Download Maven, Python, Java (jdk1.5):
make sure the excutables mvn, python, java are in your $PATH
1. Set up the following envionment variables under your login:
a. $CIPRES_HOME: directory to cipres lib installation
e.g. CIPRES_HOME=${HOME}/projects/cipres/cipres-fw
b. $CIPRES_WEB_SRC: directory to cipres-web source installation
e.g. CIPRES_WEB_HOME=${HOME}/cipresweb
b. $CIPRES_WEB_HOME: directory to store the result and uploaded files
e.g. CIPRES_WEB_HOME=${HOME}/cipresweb-results
c. $PORT: port in the URL to invoke web application
e.g. PORT=8888
d. $HOST: host in the URL to invoke web application
e.g. HOST="8ball.sdsc.edu"
e. $M2_REPO: maven repository, default is ${HOME}/.m2/repository
e.g. M2_REPO=${HOME}/.m2/repository
f. $CATALINA_HOME: Tomcat installation directory
e.g. $CATALINA_HOME=${HOME}/tomcat/apache-tomcat-5.5.23
* install phy.fi for treeviewer (maybe different on your machine
depending on the installation and conifiguration):
g. $PYTHON_EXE: directory to the python executable
e.g. $PYTHON_EXE=${HOME}/bin/python
i. $PHY_FI: directory to the treeview program
e.g. $PHY_FI=${HOME}/tools/phy.fi/phy.fi/newick_parser_2.py
j. $PYTHONPATH: directory where gd.py, gd.pyc, _gd.so files are
e.g. $PYTHONPATH=${HOME}/python-gd/lib/python
2. Install and Configure Tomcat
a. change http port (default is 8080) and SHUTDOWN port in
$CATALINA_HOME/confg/server.xml if needed;
make sure http port specified in server.xml is the same as
the what PORT env variable is set to in Step 1) above;
b. to deploy cipresweb to Tomcat using maven (optional):
(alternatively, you can copy the *.war to Tomcat manually)
* Remember to change [your password] below:
i. add the following 2 lines in $CATALINA_HOME/tomcat-users.xml:
ii. add file "settings.xml" to ~/.m2/settings.xml:
tomcat
admin
[your password]
c. MySQL / Hibernate setup (optional. Database is only needed to keep track of user submission
statistics. Most installation can skip this step)
a. download MySQL driver from:
http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-3.0.17-ga.zip/from/pick?file=Downloads/Connector-J/mysql-connector-java-3.0.17-ga.zip&mirror=pick&file=Downloads/Connector-J/mysql-connector-java-3.0.17-ga.zip&mirror=pick&file=Downloads/Connector-J/mysql-connector-java-3.0.17-ga.zip&mirror=pick&file=Downloads/Connector-J/mysql-connector-java-3.0.17-ga.zip&mirror=pick#mirrors
b. unpack and copy mysql-connector-java-3.0.17-ga-bin.jar in unarchived
directory to $CATALINA_HOME/common/lib
i. start tomcat
3. check out and install cipres web application:
a. svn co http://nladr-cvs.sdsc.edu/svn/CIPRES/cipresdev/trunk/cipresweb
b. cd cipresweb
c. mvn clean; mvn install
d. cd cipres-web
f. update "src/main/resources/clusternodes.txt" with the
name of the cluster node the web server will connect to.
g. If you are using a database, you'll need a hibernate configuration file
in "src/main/resources" which contains all the required login information.
You can ask me for this file if needed. Again, most people can skip this.
i. mvn tomcat:undeploy; mvn tomcat:deploy (make sure Tomcat is already running)
_OR_ copy cipres-web/target/*.war to $CATALINA_HOME/webapp directly
* restart tomcat if this is the first time you install cipresweb
(jni library is being copied to Tomcat's common/lib after installation)
4. if all goes well, you should be able to launch the portal using url:
http://${HOST}:${PORT}/cipres-web
5. to run cipresweb inside Eclipse, from cipres-web directory, run:
+ mvn eclipse:clean; mvn -Dwtpversion=1.5 eclipse:eclipse
(this generates all files required to set up the Eclipse WTP project)
+ to fix JNI ClassNotFound exception in Eclipse:
in $CATALINA_HOME/conf/catalina.properties file: make sure "shared.loader"
points to the absolute path of the shared/classes and shared/lib, e.g.
shared.loader=/scratch/slocal/tomcat/tomcat/shared/classes,/scratch/slocal/tomcat/tomcat/shared/lib/*.jar
+ guigen applet doesn't work inside Eclipse
5. TODO:
instructions on how to set up BASIC Authentication for "admin" page
instructions on how to set up MySQL
instructions on how to setup SGE on cluster to run bootstrap-raxml