OpenMRS Debian Appliance

Welcome

A description of how to install OpenMRS  on Debian 8 (stable / Jessie) server; this was performed in a VirtualBox VM, but should work on a server.

Requirements

Installed in a VM with 512 MB of RAM and 8 GB of (virtual) hard disk space.

Installation

Download the Debian 8 (stable) installer CD.iso (~630MB) from the Debian homepage

Choose appropriate usernames / passwords; for my generic appliance I used:

Host name "openmrs"

Domain name "openmrs.org" (may need to match your local network)

Set root password as "openmrs" (remember to use something more secure)

Set new user "openmrs" with password "openmrs" (remember to use something more secure as password)

Install the "Base system" only (use spacebar to deselect Desktop Environment)

Install Grub to MBR

Restart (as requested)

Edit your repository sources.list (/etc/apt/sources.list) to include Java (non-free). Do this by adding "non-free contrib" to each repo line. It should look something like:

deb http://security.debian.org/ jessie/updates main contrib non-free deb-src http://security.debian.org/ jessie/updates main contrib non-free deb http://ftp.de.debian.org/debian/ jessie-updates main contrib non-free deb-src http://ftp.de.debian.org/debian/ jessie-updates main contrib non-free deb http://ftp.de.debian.org/debian/ jessie main contrib non-free deb-src http://ftp.de.debian.org/debian/ jessie main contrib non-free


If you have necessary .deb files on a CD / iso (rather than downloading from internet) and copy all the .debs to /var/cache/apt/archives:

mount -t iso9660 -o ro /dev/cdrom /cdrom cp /cdrom/*.deb /var/cache/apt/archives/


Install the components as root, install mysql (remember the root password which you use as this will be used later), and make sure tomcat7 is not running for configuration:

apt install build-essential git openjdk-7* tomcat7 tomcat7-admin tomcat7-common  mysql-server curl systemctl stop tomcat7


Create a tomcat user able to perform operations. Edit /etc/tomcat7/tomcat-users.xml to have the following (edit the password to something more secure!)

 

Remove the Tomcat Java security (? unnecessary if only 1 Tomcat application present). Edit /etc/init.d/tomcat7 and make sure that the line containing TOMCAT7_SECURITY is set to "no"

 

Create the necessary directory for OpenMRS settings


Reload deamon due to changes to init.d and start tomcat7

 

From a networked client computer, go to webpage (replcing ipaddress with the actual IP of the OpenMRS server):

http://ipaddress:8080/ to check Apache working http://ipaddress:8080/manager/html to login to Apache (tomcat / tomcat)

Deploy openmrs.war file (download from this site)

Configuration

You can now proceed with the OpenMRS setup wizard. Outlined below are recommended defaults if this is the first time you are using OpenMRS. Only change what is noted below.

Remember to wait at least 10 minutes after completing this setup to allow the server to act on all commands; when finished, it will take you to the OpenMRS Homepage.

Start at http://ipaddress:8080/openmrs (where ipaddress = e.e. 192.168.1.2)

Step 1

Under Do you currently have an OpenMRS database installed that you would like to connect to?, select No.

Enter root as Username and openmrs as Password and press Continue.

http://archive.openmrs.org/wiki/Image:Configure_step_1.png

[edit]

Step 2

Under Do you want to also add demo data to your database - openmrs?, select Yes.

Enter root as Username and openmrs as Password and press Continue.

http://archive.openmrs.org/wiki/Image:Configure_step_2.png

Step 3

Under Do you want updates to the database to be automatically applied on started up when a new web application is deployed?, select Yes and press Continue.

http://archive.openmrs.org/wiki/Image:Configure_step_3.png

Step 4

Enter and re-enter a long password with mixed case characters and numbers and press Continue.

http://archive.openmrs.org/wiki/Image:Configure_step_4.png

Step 5

Leave everything blank and press Continue.

http://archive.openmrs.org/wiki/Image:Configure_step_5.png

Step 6

Press Finish.

http://archive.openmrs.org/wiki/Image:Configure_step_6.png

Notes

If you need login or password info, try these defaults (as used in examples above):

  • OpenMRS: admin/test -> admin/Password.1

  • Tomcat: tomcat/tomcat

  • MySQL: root/openmrs

  • Debian 7 Appliance: root/openmrs or openmrs/openmrs

This example are not meant for production environments. It uses very weak passwords, no encryption and does not support very large datasets. Please do not put patient data into the appliance without considering these limitations.

If you have any questions, email the mailing list for assistance.

Sources

http://openmrs.org/wiki/OpenMRS_Appliance original

http://openmrs.org/wiki/Step-by-Step_Installation_for_Implementers

http://www.debianadmin.com/how-to-setup-apache-tomcat-55-on-debian-etch.html