Wiki Spaces


Get Help from Others

Q&A: Ask OpenMRS
Discussion: OpenMRS Talk
Real-Time: IRC Chat | Slack


Page tree
Skip to end of metadata
Go to start of metadata


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.


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


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 "" (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 jessie/updates main contrib non-free
deb-src jessie/updates main contrib non-free
deb jessie-updates main contrib non-free
deb-src jessie-updates main contrib non-free
deb jessie main contrib non-free
deb-src 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!)

<role rolename="tomcat"/>
<role rolename="admin"/>
<role rolename="manager"/>
<role rolename="manager-gui"/>
<user name="admin" password="admin" roles="tomcat,admin,manager,manager-gui"/>


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

mkdir /usr/share/tomcat7/.OpenMRS
chown -R tomcat7:root /usr/share/tomcat7/.OpenMRS

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

systemctl daemon-reload 
service tomcat7 start


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)


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.

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.


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.

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.

Step 4

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

Step 5

Leave everything blank and press Continue.

Step 6

Press Finish.


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 original