Install OpenMRS (Open Medical Record System) On Ubuntu 14.04 LTS Server
In our previous tutorial, we did show you how to install OpenMRS on CentOS 6.5 server. Today, here we will show you how to install OpenMRS on Ubuntu 14.04 LTS server. As you may know already, 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.
Before installing OpenMRS, you should install Java 1.6, MySQL server, and Apache Tomcat 6 on your server before installing OpenMRS. Be mindful that OpenMRS doesn’t support Java 1.7 and Tomcat 7 or later versions, so don’t install them, or if they are installed already, remove them.
To install Java on your Ubuntu server, do the following:
sudo apt-get install openjdk-6-jdk
Now, we’ve got the JDK 6 version installed on our system. Then, install MySQL server and Tomcat as follows.
To install, MySQL on Ubuntu, open up the Terminal and run the following command:
sudo apt-get install mysql-server mysql-client
During the mysql installation, you’ll be prompted to set the MySQL root user password.
Re-enter the password:
Now, let us install Tomcat as follows.
sudo apt-get install tomcat6 tomcat6-admin tomcat6-common tomcat6-user tomcat6-docs tomcat6-examples
You can access the Apache Tomcat homepage using the URL: http://ip-address:8080
For security reasons, using the manager webapp is restricted to users with role “manager”. The host-manager webapp is restricted to users with role “admin”. Users are defined in
/etc/tomcat6/tomcat-users.xml. Let us enable a user called “admin” to deploy OpenMRS from Tomcat Manager window.
To do this, edit file /etc/tomcat6/tomcat-users.xml,
Add the following directive. Replace the username and password with your own values.
[...] <role rolename="manager"/> <user name="admin" password="ubuntu" roles="manager" /> [...]
Restart Tomcat service.
sudo service tomcat6 restart
Now, you can access the Tomcat manager using URL: http://ip-address:/manager/html
Enter the username and password which we have defined in the tomcat-users.xml file.
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.
sudo mkdir /usr/share/tomcat6/.OpenMRS/ sudo chown -R tomcat6 /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.
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.
Select the type of your Installation and click the forward arrow button. OpenMRS has three installation types called Simple, Advanced and Testing respectively.
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.
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.
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.
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.
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.
Great! Welcome to the OpenMRS Administrative dashboard!
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.
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.