[ < ] [ Help Home ] [ > ]
WebLab System Installation Instructions
This page tries to provide exhaustive instructions for installing the local version of WebLab system.
If you find any omissions, errors, or just confusing bits in the instructions, please send an email to , and we'll try to fix things.
Till now we only provide the instructions which are sufficient for you to install a normal WebLab. The instruction about how to customize the local WebLab will come up later.
  • System Structure
    There will be a directory whose name is weblab_build after you decompress the archieve downloaded from our web site. Please run ant under the weblab_build directory to compile the source code for the system. In weblab_build directory, you will find three directories:
    • ROOT
      The root directory for the web application, which is always deployed under $CATALINA_BASE/webapps/. The $CATALINA_BASE depends on your Tomcat configuration.
    • worker
      The directory for the computing deamon program which in charge for the job execution. You can choose to put it in the proper place. We suppose you put it under /opt/ directory.
    • weblab
      Supportive directory for the system, which is used to store the index files and some essential scripts. Also you can put this directory anywhere, and we suppose you put it under /opt/ directory.
    We recommand that you change the owner of all the files in these three directories to tomcat and manipulate the whole WebLab system as tomcat user.
  • Software Install
    We assume you have root access to the installation machine. If you do not, get your systems administrator to install this software for you.
    Please install the softwares listed in fundamental software requirement and service software requirement. For the reason that different linux distribution has its own software package management strategy, we thus do not provide specific instruction here. Please refer to the respective instruction for each linux distribution.
    Please make sure that all the executable files from the service software packages should be put under the directories in $PATH environment variable.
  • Software Configuration
    We instroduce the key points for configuring Apache, Tomcat and MySQL. Similarly, we do not provide step by step introduction here. Please refer to the respective instruction for each linux distribution.
    • Apache
      • Properly configure apache to use mod_jk to connect to Tomcat. Please click here to see detailed information about mod_jk.
      • Please note the following aspects in the Apache configuration files.
        ......
        #make the index.jsp as the directory index file
        DirectoryIndex index.jsp
        ......
        #We assume you use jk worker whose name is "weblab" to link Apache and Tomcat.
        #Add following commands to proper place to let Tomcat handle all .jsp and .do request.
        jkMount /*.jsp weblab
        jkMount /*.do weblab
        jkMount /download weblab
        jkMount /DownloadPDBFile weblab
    • Tomcat
      The main point for configuring Tomcat is Context configuration file which corresponds to the web application of local WebLab system.
      Assume you have the following Host section in $CATALINA_BASE/conf/server.xml.
      <Host name="www.weblab.org.cn" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> </Host>
      Then you should have the $CATALINA_BASE/conf/Catalina/www.weblab.org.cn/ROOT.xml like this:
      <Context docBase="ROOT" debug="2" reloadable="true" allowLinking="true">
      <Resource name="jdbc/weblab" auth="Container" type="javax.sql.DataSource" factory="org.apache.commons.dbcp.BasicDataSourceFactory" removeAbandoned="true" removeAbandonedTimeout="60" logAbandoned="true" maxActive="300" maxIdle="80" maxWait="10000" username="dbuser" password="dbpasswd"
      driverClassName="com.mysql.jdbc.Driver"
      url="jdbc:mysql://127.0.0.1:3306/weblab?useUnicode=true&amp;characterEncoding=utf8"/>
      </Context>
      Please make sure that the dbuser has the privilege to construct new database in MySQL system. You will later use this account to construct the basic database and tables needed by WebLab system.
    • MySQL
      The key point for configurinng MySQL is the innodb support. We give the exemplifying section for the innodb function in my.cnf.
      ......
      #skip-innodb
      innodb_buffer_pool_size = 2G
      innodb_additional_mem_pool_size = 16M
      innodb_data_file_path = ibdata1:10M:autoextend:max:128M
      innodb_thread_concurrency = 16
      innodb_flush_log_at_trx_commit = 2
      innodb_log_file_size = 1G
      innodb_log_buffer_size = 8M
      innodb_max_dirty_pages_pct = 90
      set-variable = innodb_log_files_in_group=2
      innodb_lock_wait_timeout = 50
      ......
  • WebLab Configuration
    This section explains the configuration changes you have to make so that WebLab will run on your local set-up.
    • web application configuration
      This section tell you how to customize several configuration files under ROOT.
      • $CATALINA_BASE/ROOT/WEB-INF/conf/jutil/system.xml
        This file is the main configuration file for the web application for the WebLab system. We have relatively specific instruction explain each item in this xml file. Following we list the items which should be modified according to your local set-up, and you can also change other items according to the instruction in the comment section in the file.
        ......
        <!--The following mail section should be modified to designate the SMTP server, the email account, the password, the sender email displayed in the email sent by local WebLab system and the system administrator's email-->
        <mail>
        <smtp-host>mail.weblab.org</smtp-host>
        <mail-account>weblabNoticer</mail-account>
        <mail-password>********</mail-password>
        <mail-sender>weblab@mail.weblab.org</mail-sender>
        <admin-email>admin@mail.weblab.org</admin-email>
        </mail>
        ......
        <custom>
        <!--You need to give the absolute path of the dot program of Graphviz-->
        <param name="GraphvizPath" value="/usr/bin/dot"/>
        <!--You need to give the absolute path of the "weblab" directory-->
        <param name="worker-dir" value="/opt/worker/"/>
        <!--You need to give the absolute path of the "worker" directory-->
        <param name="weblab-dir" value="/opt/weblab/"/>
        </custom>
        ......
      • $CATALINA_BASE/ROOT/WEB-INF/conf/weblab/biomartDatasetLocation.registry
        This configuration file is the registry file for the biomart module of the local set-up WebLab. You can substitute various database settings according to your needs. You can refer to http://www.biomart.org/user-docs.pdf to get detailed instruction about how to modify the registry file.
        Beside this registry file, biomart module also needs to create a directory .martj_preference in the user's home directory. Therefore, if you manage the local WebLab system using tomcat user, please make sure that there is a home directory /home/tomcat .
    • computational worker configuration
      This section tell you how to configure the computational worker for the WebLab system. In the following instruction we assume you put worker directory under /opt/ direcotry.
      • /opt/worker/daemon/server.xml
        This file is the main configuration file for the computational worker. Here we list the items which should be modified according to your local set-up, and you can also later change other items according to the instruction in the comment section in the file.
        ......
        <execution
        ......
        <!--directory storing the temporary workding directory for each job-->
        working-dir="/opt/worker/work/"
        ......
        execution> ......
        <!--directory storing the software base directory for the computational daemon-->
        <programs root_dir="/opt/worker/biosoft">
        ......
        programs>
      • /opt/worker/daemon/start.sh
        This file is the startup script for the daemon of the computational worker. Some environmental variables should be set here.
        ......
        #directory storing the matrix data used for blast program
        export BLASTMAT=/usr/share/ncbi/data
        #absolute path of the directory of the computational worker
        export WORKER_ROOT=/opt/worker/
        ......
  • Database Initialization
    The following instructions tell you how to construct the database and tables necessary for the WebLab systm. We assme you have the privilege to create database in your installed MySQL system.
    • Start a MySQL console session and issue the command:
      mysql> create database weblab;
    • Exit the MySQL console session, and issue the following command to run the WebLab SQL file - weblab_db, which should be in the directory where you unpacked the downloaded package.
      mysql -u user -p weblab <weblab_db
  • Running the System
    • How to manipulate each component of the WebLab system
      • For MySQL, Apache, Tomcat, different linux distribution has its own scripts to manage these softwares. Please refer to the document for each linux distribution.
      • For the compuational worker daemon, you can use start.sh and stop.sh in daemon directory under the "worker" directory. Please note that we recommand you execute these two scripts as tomcat user.
    • How to start the WebLab system
      • start MySQL
      • start Apache
      • start the computational worker daemon
      • start Tomcat
    • How to restart the WebLab system
      • If you change the configuration files under "ROOT", please restart Tomcat to put the modification in effect.
      • If you change the configuration files under "worker", please restart not only the computational worker daemon but also Tomcat to put the modification in effect.
 

Copyright© 2006-2007, CBI All Rights Reserved.