Installation instructions - the For Dummies version
The OpenMRS standalone requires your system to have a few basic things:
1. A web browser
2. Download Java Development Kit 1.7
The OpenMRS standalone runs on an older version of Java --- Java 1.7 (yes, we have to go a bit back in time). So go ahead and install JDK 1.7 on your computer
Remember where you’ve installed it!
To check which versions of Java are installed on your computer, go to Terminal on a Mac and type the following:
You should see a list of Java Virtual Machines on your computer. For example, if you have both 1.7 and 1.8 running on your computer, you would get an output that looks something like this:
Matching Java Virtual Machines (2):
1.8.0_101, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home
1.7.0_79, x86_64: "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home
If you are a Windows user you can follow the instructions here to find out which versions of Java are installed on your computer: https://java.com/en/download/help/version_manual.xml
Verify that Java 1.7 is indeed installed on your computer.
3. Download the OpenMRS standalone
Go to: http://openmrs.org/download/
And download the most recent version – “Reference Application 2.4 Standalone Edition”
Unzip the folder.
When you open the unzipped folder you will see that everything is available and prepacked with a demo database of patients as well.
There’s just one last step -
Before you run the standalone version of OpenMRS, you have to tell your computer which version of Java to use when running OpenMRS (because we want to use an older version of Java). In order to do that you have to set the JAVA_HOME variable (its basically an environment variable that points to the location of the Java interpreter/compiler) and you do this through your computer’s command line interface.
To set the JAVA_HOME variable in Mac go to Terminal and type in the following command:
export JAVA_HOME=$(/usr/libexec/java_home -v 1.7)
To check that its been set:
or at command line type:
Your output should be something like this:
java version "1.7.0_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)
On a Windows system, to set JAVA_HOME:
a. Right click My Computer and select Properties.
b. On the Advanced tab, select Environment Variables, and then edit JAVA_HOME to point to where the JDK software is located, for example, C:\Program Files\Java\jdk1.6.0_02.
Now that JAVA_HOME is set, you can run the OpenMRS standalone.