Installation Documentation

From IHRIS Wiki

The system was created with the goal of running on a LAMP architecture - that is the Linux operating system, MySQL database, and Apache webserver with PHP coding. Our development took place on the latest release of Ubuntu Linux (8.10) however, the system should work on most Linux distributions as well as some other operating systems in which OpenMRS, Apache, PHP, and Java can run.

OpenMRS is the core of the system and must be installed first. There is a great wealth of documentation on the installation, administration, and use of OpenMRS which is freely available. However, the specific documentation on the installation of the system can be found below.

If you would like to install OpenMRS as an appliance (meaning, an instance that runs in a virtual machine such as VMWare refer to the OpenMRS Appliance Installation.

If you would rather install the system on a clean Linux box, refer to the Installing An OpenMRS Server On Linux Document.

Installing the web application

Step-by-step instructions for installing the application on Ubuntu Hardy.

$ sudo aptitude install --without-recommends libapache2-mod-jk tomcat5.5 sun-java6-jdk bzr-svn \
                    cabextract lcab smarty-gettext php5-mysql libapache2-mod-php5 mysql-server
$ bzr branch lp:rwanda-pilot ~/rwanda-pilot
$ sudo mv ~/rwanda-pilot /var/www
$ bzr branch http://svn.openmrs.org/openmrs/tags/1.3.2/ ~/openmrs

The following steps are necessary to build openmrs since we used bzr's svn plugin to check out openmrs:

$ cd ~/openmrs
$ mkdir .svn
$ echo 1.3.2 > .svn/entries
$ ant

The following steps configure tomcat and set up an environment for it (^D indicates that you should press Control-D):

$ sudo sed -i 's/^#TOMCAT_SECURITY=.*/TOMCAT_SECURITY=no/' /etc/default/tomcat5.5
$ sudo sed -i 's/^#JAVA_OPTS=.*/JAVA_OPTS="-Djava.awt.headless=true -Xmx128M"/' /etc/default/tomcat5.5
$ sudo sed -i 's,^#JAVA_HOME=.*,JAVA_HOME=/usr/lib/jvm/java-6-sun,' /etc/default/tomcat5.5
$ sudo sh -c 'cat > /etc/apache2/conf.d/openmrs'
JkWorkersFile   /etc/libapache2-mod-jk/workers.properties
JkLogFile       /var/log/apache2/mod_jk.log
JkLogLevel      info
JkMount /openmrs/* ajp13_worker
^D
$ sudo sh -c 'cat > /etc/apache2/conf.d/lmi'
Alias /lmi /var/www/rwanda-pilot/public_html
^D
$ sudo sh -c 'cat > /etc/libapache2-mod-jk/workers.properties'
workers.tomcat_home=/usr/share/tomcat5
workers.java_home=/usr/lib/jvm/java-6-sun/jre/
ps=/
worker.list=ajp13_worker
worker.ajp13_worker.port=8009
worker.ajp13_worker.host=localhost
worker.ajp13_worker.type=ajp13
worker.ajp13_worker.lbfactor=1
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=ajp13_worker
^D
$ mysql <