Step by Step guide to install OpenMRS on Ubuntu
Hi all,
This post will provide you the instructions for manually installing OpenMRS on Ubuntu. There is also an automatic installer, that can be found at Release.
System Requirements
The hardware required depends on the size of your implementation. For small implementations, OpenMRS can be run on just about any desktop or laptop.
Minimum Requirements - 100s of patients
- Processor: 1 gigahertz (GHz) or faster processor
- RAM: 256 megabyte (MB) or more memory
- Hard disk space: 40 GB hard drive or larger
- Processor: 1.5 gigahertz (GHz) or faster processor
- RAM: 2 gigabyte (GB)
- Hard disk space: 150 GB of hard drive space with RAID and appropriate backup facilities
- Processor: 2.26 gigahertz (GHz) quard processor
- RAM: 16 gigabyte (GB)
- Hard disk space: 500 GB of disk space with RAID and appropriate backup facilities
Install firefox
Usually Ubuntu comes with firefox installed. If you version of Ubuntu doesn't have firefox installed, install firefox using the below command.
sudo apt-get install firefox
Install Java
Install the latest stable release of Java. When I was writing this article, the latest stable release of Java was Java 8. Read How to install JDK 8 on Ubuntu for a step by step guide to install JDK 8 on Ubuntu here.
Install Apache Tomcat
You need a web server to run OpenMRS. The OpenMRS community recommends using either Apache Tomcat or Jetty. Lets now look at how to use tomcat to run OpenMRS. When I was writing this article, the latest release of tomcat was tomcat 9. Download the zip archive of Tomcat 9. Unpack the zip file to a suitable location such as /opt. Add a new user for tomcat and then install tomcat using the below set of commands.
sudo useradd tomcat9
cd /opt
sudo tar zxvf apache-tomcat-9.tar.gz
sudo ln -s apache-tomcat-9 tomcat9
sudo chown tomcat9.tomcat9 apache-tomcat-9
Then open the tomcat users file (e.g: /opt/tomcat/conf/tomcat-users.xml) in a text editor. Create a new user called admin with the roles admin, manager and manager-gui. This file is protected, so you need to open it as a root user (e.g: sudo gedit /opt/tomcat/conf/tomcat-users.xml). To do so, add the below lines to the tomcat users file.
<role rolename="tomcat"/>
<role rolename="admin"/>
<role rolename="manager"/>
<role rolename="manager-gui"/>
<user name="admin" password="xxxx" roles="tomcat,admin,manager,manager-gui"/>
Install MySQL
Install MySQL server package as root user, using the below command. Make sure you remember the root password.
sudo apt-get install mysql-server
Deploy OpenMRS
Download the latest stable release of OpenMRS. Then start the Tomcat server. To do that go to Tomcat's bin folder and execute the catalina.sh file.
chmod -X catalina.sh
./catalina.sh run
Navigate to http://localhost:8080/manager/html and enter your tomcat credentials. (Username and password used at the "Install Apache Tomcat section". In the Tomcat Web Application Manager window, browse the downloaded openmrs.war file. Then click upload. OpenMRS will start deploying. This may take a while. At the end of this process, the web page will refresh and /openmrs should be displayed under Applications. Click on /openmrs. You should see a window like this.
Comments
Post a Comment