Monod Server Installation Readme

  1. System requirements
  2. Server installation instructions
  3. Monod Desktop technical notes
  4. Contact


System requirements:


Certified Monod Server Platforms



Linux
Certified; RedHat Linux 7.2, 7.3, 8.0, and 9.0
Mac
Certified; Mac OS 10.1, 10.02 and 10.03
Unix
Uncertified; It should run fine on any Unix variant.
Windows
Uncertified; In theory, it should run on Windows machines as well, but in practice we've had mysterious difficulties getting it to work.
Minimum system requirements for Monod Server

We have not tested the minimal possible configuration for running the Monod server, but we recommend a fast processor (e.g. at least a Pentium III/600) and
lots of free memory (say, a couple hundred megabytes).



Server Installation instructions:

Note: Installing Monod is a reasonably complicated procedure.  Previous experience with Unix system administration, and several hours of free time, are strongly recommended.

A quick Monod Server installation checklist

Index
Required/Optional
Task
Details
1
required
Download Postgres
  • PostgreSQL 7.2.1 or higher (We are currently using v7.3.4)
  • http://www.us.postgresql.org/sitess.html OR
  • ftp://ftp.postgresql.org/pub/source/v7.3.4
  • It should be possible to run Monod from MySQL, Oracle, or another database, but this is untested and unsupported.  At a minimum, you'll need to modify the sql scripts for creating the databases to use data types supported by your database.  Please let us know if you do this so we can make your patches available to others.
2
required
Install Postgres
  • Official Postgres installation instructions
http://www.postgresql.org/docs/current/static/installation.html
  • Make sure to build Postgres using the --with-jdbc option.
  • Note that starting from Monod version 1.5, pg7.4.1jdbc3.jar has been added to WEB-INF/lib. This Postgres 7.4.1 driver will work fine with Postgres 7.4 and can also connect to Postgres 7.3.+ database (we have verified Monod using pg7.4.1jdbc3.jar with Postgres 7.3.2 & 7.3.3 database).

3
required
Download Resin J2EE/web server
  • Note: Monod is NOT compatible with other Resin versions.
  • http://www.caucho.com/download/resin-ee-2.1.12.tar.gz
  • Monod expects to find Resin in /usr/local/resin (for classpaths, etc.), which can be a symbolic link to the real location.
4
optional
Download jikes
  • Jikes 1.15
  • http://oss.software.ibm.com/developerworks/opensource/jikes/
5
optional
Create jikes binary
  • Compile Jikes on the platform where you plan to install the Monod Server
6
required
Install Resin
  • Official Caucho Resin installation instructions
http://www.caucho.com/download/install.pdf
7
required CHECKPOINT-1 Check JDK version
  • Ensure server is running JDK1.4.1+
  • http://java.sun.com/products/index.html
8
optional  CHECKPOINT-2 Check Resin installation
  • Ensure the vanilla Resin J2EE/web server can be started up as is without Monod
9
required
Download latest Monod
  • http://monod.molsci.org/downloads
10
required
Unpack Monod tar file
  • tar -xvzf monod-i.j.k.tar.gz
11
required
Create database users
  • su postgres
  • createuser -d -A -P monod
  • createuser -d -A -P monodlog
12
required
Install database schemas
  • createdb -U monod -W monod
  • createdb -U monodlog -W monodlog
  • psql monod monod < /usr/local/monod/src/sql/monod.postgres.sql
  • psql monodlog monodlog < /usr/local/monod/src/sql/monodlog.postgres.sql
13
recommended CHECKPOINT-3 Check Postgres installation
  • psql monod monod
  • \d  (to view what tables are there)
  • \d coreobject  (to view the definition for table coreobject)
  • \q  (to quite psql)
14
required*
Load standard records to database
  • Do this step ONLY if you are skipping steps #15 and #16.
  • psql monod monod < /usr/local/monod/src/sql/standardrecords.postgres.sql
15
optional
Copy Monod data from server x for data replication
  • This is required only if you are replicating a Monod server instance.  (e.g., you have a Monod production instance and you want to create a test instance with a snapshot of the production data loaded on it.)
  • pg_dump -a -d -U monod -W -O monod > myMonod.data
    • -a = dump only the data (not the DDL, data definition language)
    • -d = dump data as INSERT commands (rather than COPY)
    • -U = username
    • -W = force a password prompt
    • -O = owner
  • If you haven't created the monod db schema (step #12: psql monod monod < /usr/local/monod/src/sql/monod.postgres.sql), you can replicate both the ddl and data with the following command:
pg_dump -U monod -W -O monod > myMonod.dmp
16
optional
Replicate data on the new Monod instance
  • Copy the mymonod.data to the destination server
psql -f myMonod.data monod monod
17
recommended CHECKPOINT-4
Check Postgres data loading
  • psql monod monod
  • \d
  • \d person
  • select * from person;
  • \q
18
recommended
cron job for postgres optimization
  • Copy monod.cron from the src/sh directory to the appropriate location, /etc/cron.daily/ in the case of modern Redhat distros.  You may need to make changes to the PATH if the defaults don't contain the location of your postgresql binaries.
19
required Edit resin.conf
  • <host id... changes
  1. If you want to dedicate a 3rd-level domain name to monod and be able to access monod at monod.mydomain.edu, add the following:
  2.   <host id='monod.mydomain.edu'>
           <web-app id='' app-dir='/usr/local/monod'/>
      </host>

  3. Or you can also configure resin to map monod on an existing web server (e.g., mylab.mydomain.edu/monod), add the following under <host id=''>:
  4.   <web-app id='monod' app-dir='/usr/local/monod'/>

  5. Or for development purposes, if you want to install resin on your localhost with the homepage at /home/username/dev and monod at /home/username/projects/monod, and you want to access monod at localhost/monod, add the following under <host id=''>:
  6.            <web-app id='/' app-dir='/home/username/dev'/>
               <web-app id='monod' app-dir='/home/username/projects/monod'/>

  • <java compiler... changes
  1. If you use the jikes java compiler, locate <java compiler and change to the following:
  2. <!--<java compiler="internal" compiler-args="" work-dir='work'/>-->
    <java compiler='/usr/bin/jikes' compiler-args='-g' work-dir='tmp'/>

  3. If you use the same java compiler resin uses, you can leave <java compiler... as is OR for development purposes, you can change to the following:
  4. <java compiler="internal" compiler-args="-g -verbose" work-dir='tmp'/>

  5. We have previously run into problem when we tried to use the default resin java compiler.  On our Redhat 9.0 system, we made a symlink from /usr/java/j2sdk1.4.2_03 to /usr/java/j2sdk so that the above would work correctly.  We got around the problem by changing to the following:  

  6. <!--<java compiler="internal" compiler-args=""/>-->
    <java compiler="jikes" compiler-args="-classpath /usr/java/j2sdk/jre/lib/rt.jar"/>
20
optional
Edit resin.conf
  • <http port... changes
  1. If you want to change the port from the default to, say, 8888, you can change the following:
<http port='8888'/>
21
required
Edit monod/WEB-INF/web.xml
  • To update your database password in <resource-ref> for the monod database
  • To update your database password in <resource-ref> for the monodlog database
  • To update the jndi urls in <servlet-mapping and <jndi-link> for hessian
There are three occurrences of "http://localhost/hessian".  If you install the  Monod Server locally, you need to change these to point to your local Monod server instance (e.g., your local Monod server is monod.xyz.org, you will need to change it to http://monod.xyz.org/hessian).
22
optional
Edit monod/WEB-INF/web.xml
  • To update the paths in <path-mapping>
23
required
Edit monod/conf/monod.properties
  • To edit any paths as necessary and to change the settings for error emails.
  • Please use a local SMTP server for your EmailHost.
  • Emails will be sent to the addresses provided only in the event of an internal error in Monod, so we would appreciate your leaving EmailTo=bugs@molsci.org as a recipient to provide us with automatic bug reports.  You can add more email addresses (separated by commas) if you like.
  • Also, please add the name of your lab to the EmailSubject, e.g.
        EmailSubject = Monod Error [ John Lab, mydomain ]
24
required
Edit monod/conf/monod.properties for monod pdf directory
  • Check FileUploadDirectory and update it if needed.
  • Check that the user you plan to run Resin as can write to /usr/local/monod/pdf
Note: If you place your /usr/local/monod/pdf directory on a different partition than /usr/local/monod/WEB-INF, monod will be forced to copy (rather than rename) pdf files when they are uploaded, resulting in performance degradation.  You can adjust the efficiency of the process by changing copyBufferSize in monod.properties.
25
optional
Edit monod/conf/log4j.properties
  • To adjust the level of log file recording, update log4j.properties accordingly.
26
optional
Create monod server scripts
  • To save time, you can create a resin.monod.start script, e.g.,

#!/bin/sh

JAVA_HOME=/usr/local/java
export JAVA_HOME

USER=username
ROOT=/home/$USER
RESIN=/usr/local/resin

cd $ROOT
#su $USER -c "
$RESIN/bin/httpd.sh  -server-root $ROOT/projects/monod -J-Xmx200m -J-Xms30m -conf $ROOT/dev/resin.conf start
#"

  • To save time, you can create a resin.monod.stop script, e.g.,

#!/bin/sh

JAVA_HOME=/usr/local/java
export JAVA_HOME

USER=username
ROOT=/home/$USER
RESIN=/usr/local/resin

cd $ROOT
#su $USER -c "
$RESIN/bin/httpd.sh  -server-root $ROOT/projects/monod  -conf $ROOT/dev/resin.conf stop
#"
27
required CHECKPOINT-5

Start up monod server
  • It will take up to several minutes to start up and initiate the server the first time.
  • Look at the log files (log/debug.log, log/error.log, log/stderr.log, and log/stdout.log for error messages)
28
optional   CHECKPOINT-6 Start up web Monod
  • Open a browser and type in the url for Monod.
  • You can log in initially as Admin, with password Admin. 
  • You can change the password by clicking on "Welcome, Monod Administrator", followed by the "edit" pencil icon. 
  • You can create new users by clicking on "Browse Users" in the navigation bar
  • and then "Add new user".
29
optional  CHECKPOINT-7 Start up Monod Desktop client
  • Launch Monod Desktop client by clicking on the desktop/deploy/MonodApp.jnlp


Postgres RPM installation on Linux
  • http://www.yolinux.com/TUTORIALS/LinuxTutorialPostgreSQL.html
1. To install the Postgres package
(Options: i = display package info; U = upgrade; v = print verbose info; h = print 50 hash marks as the package archive is unpacked)

root # rpm -Uvh postgresql-*.rpm

2. To initialize Postgres database server

su - postgres
initdb --pglib=/usr/lib/pgsql --pgdata=/var/lib/pgsql/data
3. To run the postmaster when booting
root # setup
It is the easiest way to manager the Linux configuration in RedHat.
4. To let postmaster be connected with TCP/IP
a. (run postmaster manually)
root # postmaster -S -i -D/usr/lib/pgsql

b. (This must be done if you have finished step 3)
- edit the file, /etc/init.d/postgresql
- find the string "postmaster -S -D/usr/lib/pgsql"
- change the string "postmaster -S -i -D/usr/lib/pgsql"
- save it

5. To allow all local database connections on the machine, edit /var/lib/pgsql/data/pg_hba.conf

6. To start the database server

root # /etc/rc.d/init.d/postgresql start

Postgres RPM installation on Mac OS X
  • http://developer.apple.com/internet/opensource/postgres.html
  • OR Download Mark Liyanage's Mac OS X package manager
http://www.entropy.ch:16080/software/macosx/postgresql/

Postgres Installation Instructions

You must have administrator rights to perform this installation.

Do this to install for the first time (see below for update instructions):

  1. On Mac OS X version 10.3: Download and install the package pgsql-7.4.3.pkg.tar.gz
    (Note: If you get the message You cannot install this software on this disk. (null), try to click the Go Back and then the Continue buttons.
  2. Create a new user in the Users System Prefs pane:
    1. Name: PostgreSQL User
    2. Short Name: postgres
    3. Password: whatever you want
  3. Open a terminal window and type in the following commands:
  4. type sudo chown -R postgres /usr/local/pgsql/, enter administrator password when asked
  5. type su - postgres, enter the password of the newly created postgres user when asked
  6. type /usr/local/bin/initdb -D /usr/local/pgsql/data and wait for the operation to complete
  7. type /usr/local/bin/pg_ctl -D /usr/local/pgsql/data -l postgres.log start

If you would like PostgreSQL to start up automatically when the system comes up, then you can install this package which installs a StartupItem into /Library/StartupItems:
pgsql-startupitem-1.2.pkg.tar.gz

Postgres Update Instructions

If you previously installed an older version of this package, here is what you have to do to update to the most recent version:

  1. Before you install the new package, you have to dump the old database contents:
    1. Open a Terminal window
    2. Change to the postgres user using su - postgres
    3. Dump the database using /usr/local/bin/pg_dumpall > /tmp/postgresql.dump
  2. Shut down the DB server with /usr/local/bin/pg_ctl stop -D /usr/local/pgsql/data/
  3. Download and unpack the new package
  4. Install the package by double-clicking on the package icon and going through the installer screens
  5. In a new terminal window, change permissions:
    1. sudo chown -R postgres /usr/local/pgsql/
  6. Back in the first terminal window, move the old data directory and create a new one
    1. mv /usr/local/pgsql/data/ /tmp/
    2. mkdir /usr/local/pgsql/data/
  7. Initialize the new data directory
    1. /usr/local/bin/initdb -D /usr/local/pgsql/data
  8. Start the DB server using /usr/local/bin/pg_ctl -D /usr/local/pgsql/data -l postgres.log start



Contacts:

For support, please send your questions and feedback to monod@molsci.org

To stay informed, please check the web site for the latest version, and subscribe to the monod-announce mailing list by sending a message to monod-announce-subscribe@molsci.org

Also, we'll be very happy to help with installation and configuration questions, and would love to hear your feedback about Monod once you start using it.

The Modeler's Notebook and Datashare
(c) 2003-2004 The Molecular Sciences Institute
http://monod.molsci.org


Last Updated: July 30th, 2004 - 10:00