Setting up an OpenMRS Server


OpenMRS Server Installation Overview

  1. Install Java 5
  2. Install Tomcat 5.5+
  3. Install MySQL 5+
  4. Install OpenMRS

Minimum Reqiurements

1 GHz processor or better, 512 MB of memory or more, 40 GB hard drive or larger. You can set up the server on a laptop for demonstration or testing purposes. For production usage, we recommend one or two processors 1.5+ GHz, 2 GB of memory, and 150+ GB of disk space with RAID and appropriate backup facilities.

OpenMRS Server Installation Step-By-Step

  1. Install Java SDK
    • Set system environment variable JAVA_HOME = /path/to/javasdk
    Right-click on My Computer for this dialog and click on the "Environment Variables" button to edit your environment variables
    Right-click on My Computer for this dialog and click on the "Environment Variables" button to edit your environment variables
  2. Install Tomcat
    • You will need to know the port used by tomcat (default is 8080)
  3. Install MySQL (must be 4.1 or higher, 5.x recommended)
    • You will need to know the MySQL port (default is 3306)
    1. Within MySQL
      • Create a database called "amrs" with default encoding of utf-8
      CREATE DATABASE amrs /*!40100 DEFAULT CHARACTER SET utf8 */;
      • Create a user account and grant full rights to the amrs database to this user
    2. Execute the OpenMRS Demo SQL Script to load the database into the "amrs" schema
  4. Create your runtime properties file (this file tells OpenMRS where to find the database and how to authenticate to MySQL). You must make a system variable called AMRS_PROPERTIES_FILE that points to this properties file.
    Create a system variable for JAVA_HOME and another that points to your runtime properties file.  JAVA_HOME should point to the top of your JAVA installation — e.g., C:\Program Files\Java\jds1.5.0_06. The name of the system variable pointing to your runtime properties should be AMRS_RUNTIME_PROPERTIES_FILE — where AMRS is the name of your OpenMRS implementation
    Create a system variable for JAVA_HOME and another that points to your runtime properties file. JAVA_HOME should point to the top of your JAVA installation — e.g., C:\Program Files\Java\jds1.5.0_06. The name of the system variable pointing to your runtime properties should be AMRS_RUNTIME_PROPERTIES_FILE — where AMRS is the name of your OpenMRS implementation
  5. Install OpenMRS
    1. Log into tomcat manager at http://localhost:8080/manager/html
    2. Deploy war: amrs.war
  6. Set up Global Properties
    1. Certain properties should be configured right away. For example, scheduler.username and scheduler.password should be set to a valid admin user so that scheduled tasks can be performed.