openmrs_logo_white_large.2

 

 

 

OpenMRS , Stands for Open Medical Record System, is a collaborative open source project to develop software to support the delivery of health care in developing countries. It grew out of the critical need to scale up the treatment of HIV in Africa but from the start was conceived as a general purpose electronic medical record system that could support the full range of medical treatments.

 

In this tutorial, let us see how to install OpenMRS enterprise edition on CentOS 6.5 server. You should install Java 1.6 and above , MySQL server, and Apache Tomcat 6 on your server before installing OpenMRS. Be mindful that OpenMRS doesn’t support Tomcat 7 or later versions, so don’t install them.

 

 

Installing JAVA

First check JAVA is installed or not in your system, JAVA is the first requirement of Apache Tomcat installation. Use following command to check if you have java installed or not.

 

#java -version

 

If not follow my previous post of installing java on centos.

 

Installing MySQL 

 

#yum install mysql mysql-server

#service mysqld start

#chkconfig mysqld on

 

By default, mysql root password is empty. Leaving mysql administrative user password as empty is not advisable. So, let us setup mysql root user password using the following command:

 

#mysql_secure_installation

 

Enter your root password twice, and continue with the default values by simply pressing “y”, and you’re done.

 

 

Install Tomcat 

#yum install tomcat6 tomcat6-webapps tomcat6-admin-webapps

 

Screenshot-1

 

#service tomcat6 start

#chkconfig tomcat6 on

 

 

Screenshot-2

 

Edit iptables, and allow the Tomcat default port 8080.

 

#vi /etc/sysconfig/iptables

-A INPUT -m state –state NEW -m tcp -p tcp –dport 8080 -j ACCEPT

 

Restart the iptables service to take effect the saved changes.

 

#service iptables restart

 

 

Now, you can access the Apache Tomcat homepage using the URL: http://ip-address:8080

 

Screenshot-3

 

 

For security reasons, using the manager webapp is restricted to users with role “manager”. Let us enable a user to access the Tomcat manager webapp, so that we can deploy the OpenMRS through Tomcat. Users are defined in $CATALINA_HOME/conf/tomcat-users.xml.

 

To do this, edit file /usr/share/tomcat6/conf/tomcat-users.xml,

 

 

#vi /usr/share/tomcat6/conf/tomcat-users.xml

Add the following directive. Replace the username and password with your own values.

 

<role rolename=”manager”/>

<user name=”sathish” password=”bhuvi” roles=”manager” />

 

Screenshot-4

 

#service tomcat6 restart

 

Screenshot-5

 

 

Now, you can access the Tomcat manager using URL: http://ip-address:/manager/html

 

Screenshot-6

 

 

 

Enter the username and password which we have defined in the tomcat-users.xml file.

 

 

Screenshot-8

 

This is how my Tomcat Manager window looked. From here, we can deploy OpenMRS.

 

That’s it. We installed all the required prerequisites. It’s time to install OpenMRS.

 

 

Download And Install OpenMRS

Go to the OpenMRS download page and download the OpenMRS enterprise(openmrs.war file) latest version. At the time writing this document, the latest version is 1.9.7.

 

Create a directory for OpenMRS, and change the ownership of that directory to the tomcat user.

 

#mkdir /usr/share/tomcat6/.OpenMRS/

 

#chown -R tomcat:root /usr/share/tomcat6/.OpenMRS/

 

After downloading the openmrs.war file, open the Tomcat manager using the URL http://ip-address/manager/html. Scroll down to the Deploy section, and browse to the openmrs.war file. Click Deploy button to start deploying the OpenMRS.

 

 

Screenshot-9

 

Screenshot-10

 

The deploying session will take a while depending upon the speed of your Internet connection. After deploying the OpenMRS application, the Tomcat manager page will be automatically refreshed, and the openmrs application will be showed up in list applications.

 

Click on the /openmrs link in the Application section or navigate to http://ip-address:8080/openmrs to install it.. The following screen should open. Select your preferred language and click on the forward arrow button.

 

Screenshot-12

 

Select the type of your Installation and click the forward arrow button. OpenMRS has three installation types called Simple, Advanced and Testing respectively.

 

 

Screenshot-13

 

Simple Installation:

This option allows you to install OpenMRS by creating a new database with the demo data. This is suitable to try out the system on your local machine. This option requires a MySQL server running on the local machine listening on the address localhost. You will need to provide the password of the MySQL root account.

 

Advanced Installation:

This option allows you to select the database url, name etc. and customize all the installation settings. Choose this option when you are installing OpenMRS in a production environment.

 

Testing Installation:

This option allows you to copy data over from a production database and upgrade/test an OpenMRS version in a safe/separate environment.

 

As I wish to test it in my local machine, I selected the Simple installation type.

 

Enter the MySQl root user password. Note down the OpenMRS administrative default username/password. You should change default credentials immediately after log in. The default username is: admin, and the default password is: Admin123. If you want to add demo data to your database, select Yes and click on the forward arrow.

 

Screenshot-14

 

Now, all required input has been collected and is ready to be processed. Click the right arrow button to create tables, data, etc. This could take up to several minutes.

 

Screenshot-15

 

Screenshot-16

 

 

OpenMRS installation is in progress.

 

When complete, you will be taken to the OpenMRS main screen. Enter the administrative username and password. As I mentioned before, the default username/password is admin/Admin123.

 

Screenshot-17

 

Great! Welcome to the OpenMRS Administrative dashboard!

 

 

Screenshot-18

 

As a security precaution, we must change the default administrative user password. To do that, go to the My Profile section on the top right corner of the dashboard. Navigate to Change Login Info tab, and enter the old password and new password twice.

 

Screenshot-19

 

 

That’s it. Now log out and log in back to OpenMRS. Go to the Administration section. From here, you can create/manage users & patients, patient visits, orders, programs and all kind of administrative tasks related to the Hospital.

 

Screenshot-20

 

 

Installation task is over. It is time to learn how to use OpenMRS. Nothing is difficult, OpenMRS community offers both user guide and Administrator guide. Read them and start using OpenMRS.

 

Advertisements