1. Saptarshi Purkayastha, PhD
Assistant Professor of Health Informatics
Indiana University – Purdue University Indianapolis
July 25th, 2016 – Medellin, Colombia
OpenMRS Installation
2. 1. OpenMRS Standalone - OpenMRS Standalone provides a
simplified, all-inclusive installation option with both an
server. You can have a local copy of OpenMRS running within
download and expand the archive, and then run the extracted
file. Your browser will open a new instance of the OpenMRS
username is "admin" and the default password is "Admin123".
2. OpenMRS Platform - Recommended for advanced users using
OpenMRS 2.x or Platform in production. Requires an existing
such as Apache Tomcat, and an existing database such as
3. OpenMRS Reference application – The reference application
download is a zip archive which includes the platform war
OpenMRS addon
(omod files).
Choosing which OpenMRS to install
3. 1. Web browser – Since the OpenMRS reference application is a
web application, you will need a web browser to install and use
Firefox or Chrome are the recommended the browsers.
2. Java is the platform on which OpenMRS has been programmed.
OpenMRS platform since v2.0 requires Java 8. The reference
run on Java 7 since they use the Platform 1.x line. Later releases
v2.0 will require Java 8. Due to backwards compatibility, Java 8
versions of OpenMRS too.
3. MySQL 5.6 is recommended as the database management
system (DBMS). Due to the use of Hibernate (a database
OpenMRS is also supposed to work with MariaDB (a MySQL
MS SQL server. But these other DBMS have not been tested to
reference application.
4. Apache Tomcat – a Java servlet container to run web
applications. OpenMRS has been deployed on Jboss and
the reference application has not been tested to work on these
servers.
Install dependencies
4. • OpenMRS works on Sun/Oracle Java or OpenJDK. It has not been tested with other
Java virtual machines such as JRockit or IBM J9
• Java installation instructions can be found here:
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
• The webupd8 has a popular ppa that is used in Ubuntu. See here:
http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
• Once Java 7 is installed, configure the JAVA_OPTS environment variable to allocate
adequate heap memory as well as PermSize variable.
JAVA_OPTS="-Xms512m –Xmx1024m –XX:MaxPermSize=256m" (Sets the heap min size and max size)
• In linux, set this in /etc/environment or .bashrc file
• In Windows, control panel System Advanced system settings Environment
variables New (under user variables) variable name: JAVA_OPTS and value
provided above
Java Download and installation
5. • The OpenMRS reference application downloads can be found here:
http://openmrs.org/download/
• Choose the OpenMRS Standalone download for now.
https://sourceforge.net/projects/openmrs/files/releases/OpenMRS_2.3.1/openmrs-standalone-2.3.1.zip/download
• In this tutorial we will also show you provide you information for more advanced
installation. You can use this for extending OpenMRS tutorial.
• After the above download completes, please extract all files. Here you will see openmrs-
standalone.jar. If you double-click on this, it should start Java and start deploying
and start deploying OpenMRS. The browser will open once OpenMRS is ready to be
used
OpenMRS download
6. Starting OpenMRS standalone
You will see a screen
once you start the
standalone
Choose the
Demonstration mode,
because we want demo
data and the starter
dictionary that is part of
the reference
application.
7. Allow ports to communicate with
MySQL
The 2.x standalone uses Tomcat on port
8081 and MySQL on port 3316. These
are not the default ports of Tomcat and
MySQL deliberately, so that there is no
conflict with existing installations
You can run the standalone side-by-side
with the platform or more advanced
installation by using the individual
components, as shown in the slides later.
8. OpenMRS Standalone configuration
options
Tomcat Port This is the port at which to run Tomcat
MySQL Port This is the port at which to run MySQL
File → Quit This stops Tomcat and MySQL and then closes the
File → Launch Browser This opens the OpenMRS login page for the current web
File → Clear Output This clears the output log in the user interface text area,
log file written on the file system
Start
This button runs Tomcat, which will automatically start the
engine if it was not already running. For the embedded
connection automatically starts the MySQL engine
Stop This button stops Tomcat and then also stops the MySQL
without closing the application
9. OpenMRS Starts with Login
• Browser should start with OpenMRS 2.x login page.
• If there is any error, you will see a different screen along with the
error message. The error message is also known as Exception.
Remember to report error messages with the error log (the box
which showed OpenMRS starting).
• Username: admin
• Password: Admin123
• Remember that a
Location must be
Selected or else the
Login button will not be
activated