Friday, April 1, 2011

Building and Deploying OpenMRS from the Code Base

This blog post deals with building and deploying the OpenMRS codebase. Please note that for this example I'm using SpringSource Tool Suite as my IDE.

The first step is to create a new workspace and then get the OpenMRS code. the steps for doing this are outlined at

The next thing you'll need to do is right click on the pom.xml within the openmrs project and select "Run As" --> "Maven Install"

It took about a minute for everything to build on my machine, but once it was all done I was left within a WAR file on my local hard drive. For me it was located at: C:\Users\jeremy\Documents\OpenMRS\openmrs\webapp\target\openmrs.war Please note that you'll need to "refresh" you workspace in order for it to show up in your Project Explorer tree.

The next step is to take the openmrs.war file and place it in the webapps folder within your tomcat install or for me in the customized tomcat instance provided by SpringSource. Once you either start up or restart your tomcat instance you should see a new folder in the webapps folder of your tomcat install that is called 'openmrs'.

You'll then need to go to http://localhost:8080/openmrs/index.htm

At that point you'll see a screen that asks if you want to populate the MySQL database with test data or if you want to start from scratch. Either way you'll need to provide the root password for your MySQL database so that it can be configured properly for OpenMRS.

If you choose to let OpenMRS create the test data for you then you'll next see a screen that lists 4 or 5 tasks each of which have a progress bar. I believe it took about 5 minutes for my machine to churn through everything on that page. Once that step is all done then you should see the following screen:

At that point you should be able to use the default user name / password (admin / Admin123) to check out the application. NOTE: Usually the default is admin / test, but something with this installation process changes that up.

No comments:

Post a Comment