OpenMRS Installation Windows

[article] [edit page] [discussion] [history]

From Humanitarian-FOSS Project Development Site

  1. Download and install tomcat Apache Tomcat 6.0.16 on your machine.
  2. Download EasyEclipse Server Java. To configure Eclipse, start it up, then select Window->Preferences and configure Tomcat as follows:
    1. In the Tomcat pane, select "Version 6.x" and set "Tomcat home" to the apache-tomcat-6.0.16 directory from the previous step.
    2. In the Tomcat Manager pane, set the "ManagerApp username" to "tcmanager" (no quotes) and "ManagerApp password" to abcd1234. Click on "Add to tomcat-users.xml."

    Unfortunately, uploading a web app (like OpenMRS) to the tomcat server from within Eclipse does not seem to work. In this configuration step, we have set up Tomcat itself to allow you to upload the web app from the Tomcat Manager web app; for that, you must have a Tomcat user with the right permissions, which is what we did in step 2. Now start Tomcat by clicking on the fourth button from the left in the Eclipse toolbar.

  3. Install OpenMRS from the OpenMRS Subversion repository. Do this by creating a new Subversion project. Use http://svn.openmrs.org as the server and navigate to openmrs/trunk. Build the WAR (web app archive) file by right-clicking on build.xml and selecting Run As->Ant Build. This will build the web app but not install it on the Tomcat server.
  4. Configure the OpenMRS runtime properties as follows:

    1. Using a text editor, create a runtime configuration file named OPENMRS-runtime.properties
    2. Add the following lines to openmrs-runtime.properties:
      connection.username=openmrsuser
      connection.password=tryopenmrs
      connection.url=jdbc:mysql://storage1.cs.trincoll.edu:3306/openmrs?autoReconnect=true
      
      1. Now you must create a system variable that directs the OpenMRS application to the runtime configuration file
      2. Right-click on the My Computer icon (typically on the desktop or under the Start menu) and select "properties"
      3. Under the "Advanced" tab, click the "Environment Variables" button
      4. You should see two sections: one for user variables and another for system variables
      5. Click the "New" button within the System Variables section (near the bottom) Variable name: OPENMRS_RUNTIME_PROPERTIES_FILE
        Variable value: C:\path\to\your\OPENMRS-runtime.properties
        (note: you will need to specify the path to the runtime configuration file you created earlier)
    3. Reboot (you must reboot for the new system variable to be available to all programs)
    4. What this step does is to tell the web app (once you finally access it) where the database is located and what (MySQL) username and password to use to access it. We won't actually use the database for this exercise, but OpenMRS will not run without this being properly configured.

  5. Install the web app into Tomcat:
    1. Open a web browser and point it to http://localhost:8080/manager/html. You will be prompted for a user name and password; enter tcmanager and abcd1234.
    2. Navigate to the bottom of the Manager page to "Select WAR file to upload." Browse to openmrs/dist/openmrs.war in your Eclipse workspace.
    3. Click on "Deploy."
  6. See if all has worked properly by pointing your browser at http://localhost:8080/openmrs. You should get the OpenMRS login screen; you can log in with Username admin and Password test.
Personal tools