Actions
Public Interface¶
Introduction¶
cdb.mice.rl.ac.uk hosts the public web service interface to the Configuration DB. It does not host the database but points to the read only database slave. The software is distributed in the form of a war file that has to be hosted in a servlet container, in this case Tomcat. This machine is shared with a number of other services running under an Apache web server.
Overview¶
install and configure Tomcat
install and configure Configuration DB war file and configuration files
Detailed Instructions¶
- install dependencies
yum install xml-commons-apis.x86_64 tomcat5 postgresql-jdbc yum install xalan-j2-2.7.0-9.9.el6_5.noarch yum install log4j-1.2.14-6.4.el6.x86_64.rpm
- configure dependencies for
tomcat5
or forln -s /usr/share/java/postgresql-jdbc.jar /var/lib/tomcat5/common/lib/postgresql-jdbc.jar ln -s /usr/share/java/xalan-j2.jar /var/lib/tomcat5/common/lib/xalan-j2.jar java jar -i /usr/share/java/jakarta-commons-modeler-1.1.jar
tomcat7
:ln -s /usr/share/java/postgresql-jdbc.jar /usr/share/tomcat/lib/postgresql-jdbc.jar ln -s /usr/share/java/xalan-j2.jar /usr/share/tomcat/lib/xalan-j2.jar jakarta ???
- Tomcat7 requires Java 1.7 or later so on
/etc/tomcat/tomcat.conf
:JAVA_HOME="/usr/lib/jvm/jre-1.8.0"
- change port used by Tomcat
emacs /etc/tomcat5/server.xml port 8080 -> 4443
- copy the war file to /var/lib/tomcat5/webapps/
- configure Configuration DB
mkdir -p /opt/mice/etc/cdb-server/
- copy the log4j.properties file to /opt/mice/etc/cdb-server/
emacs /opt/mice/etc/cdb-server/cdb.props db.url=jdbc:postgresql://heplnm069.pp.rl.ac.uk:5432/ db.name=**** db.user=**** db.pwd=**** db.jdbc=org.postgresql.Driver
For
heplnm072:
server.name=MICE Production Server - Public read only interface # primary cdb #db.url=jdbc:postgresql://172.16.246.25:5432/ # standby cdb - Sept. 2015 db.url=jdbc:postgresql://localhost:5432/ db.name=cdb db.user=**** db.pwd=**** db.jdbc=org.postgresql.Driver
chown tomcat:tomcat /opt/mice/etc/cdb-server/cdb.props chmod 400 /opt/mice/etc/cdb-server/cdb.props
- create the Configuration DB log file directory
mkdir -p /var/log/mice/cdb/ chown tomcat:tomcat /var/log/mice/cdb/
- customise logging levels
emacs /opt/mice/etc/cdb-server/log4j.properties
- /opt/mice/etc/cdb-client/cdb.props
cdb.server=http://heplnm072.pp.rl.ac.uk:4443
- get Tomcat up and running as a service
/sbin/service tomcat5 start /sbin/chkconfig tomcat5 on
- Set the max e min memory used by tomcat on
/etc/tomcat/tomcat.conf
CATALINA_OPTS="-Xms256M -Xmx1024M"
- configure Apache to forward messages to Tomcat
- Open the reverse proxy on the Apache machine where SELinux should be disabled.
- Log files to check:
- /var/log/mice/cdb/cdb.log
- /var/log/tomcat6/catalina.out
Updated by Franchini, Paolo almost 5 years ago ยท 23 revisions