Installation Documentation

The system was created with the goal of running on a LAMP architecture - that is the 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 [http://openmrs.org/wiki/OpenMRS_Appliance OpenMRS Appliance Installation].

If you would rather install the system on a clean Linux box, refer to the [http://openmrs.org/wiki/Installing_An_OpenMRS_Server_On_Linux Installing An OpenMRS Server On Linux] Document.

Installing the web application

Step-by-step instructions for installing the application on Ubuntu Hardy. For purposes of these instructions, we'll assume you're server is installed to respond to http://example.com/

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

The following steps are necessary to build openmrs since we used svn to check out openmrs:

$ cd ~/openmrs $ JAVA_HOME=/usr/lib/jvm/java-6-sun ant

The following steps configure tomcat and set up an environment for it:

$ sudo sed -i 's/^#(TOMCAT5?_SECURITY)=.*/\1_SECURITY=no/' \ /etc/default/tomcat5.5 $ sudo sed -i 's/^#(CATALINA|JAVA)_OPTS=.*/\1_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'< /etc/apache2/conf.d/lmi' < /etc/libapache2-mod-jk/workers.properties' < - EOF $ sudo /etc/init.d/tomcat5.5 restart $ sudo /etc/init.d/apache2 restart

Finally, get openmrs running in tomcat:

$ cd ~/openmrs $ sudo ln -s ~/openmrs /usr/share/tomcat5.5/.OpenMRS $ patch -p0 <

- - + + - + - - + +

EOF $ ant install

The following commands install the form entry module which, even though it is essential for OpenMRS use, is not included in the primary installation.

$ mkdir ~/openmrs/modules $ cd ~/openmrs/modules $ wget http://modules.openmrs.org/modules/download/formentry/formentry-3.3.4.omod $ sudo chown -R tomcat55 ~/openmrs/modules $ sudo /etc/init.d/tomcat5.5 restart

Navigate to http://example.com/openmrs/admin/modules/module.list and make sure the formentry module is enabled.

Debian

Similar steps work on Debian but some changes may be needed. The contents of /etc/default/tomcat5.5 differ slightly and tomcat-users.xml is in /var/lib/tomcat.5.5 instead of /etc/ tomcat55. Also, see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=402229