Millenium Villages Project

= OpenMRS Packaged for Ubuntu/Debian/IHL =

Packaged Tarball
Get it here: MVP OpenMRS Tarball (~46mb)

1. Install MySQL:
> sudo apt-get install mysql-server When asked for a password it's best to leave it blank. If you do set a password REMEMBER it!

2. Install Java:
> sudo apt-get install sun-java6-jdk

Accept Sun's license.

3. Copy the OpenMRS tar ball (openmrs.tar.gz) to a good location
Like /opt or /usr/local

4. Uncompress the tar ball
> cd > tar -xvzf openmrs.tar.gz

5. Load in the databse dump
> mysql -p < openmrs/install/db.dump

6. Make sure permissions are granted on DB
> mysql -p -e "use openmrs; create user test identified by 'test'; grant all on openmrs.* to test;"

Don't worry about an error to the effect of "Operation CREATE USER failed for 'test'@'%'"

This just means the user already exists.

7. Install the start-up script
> ln -s openmrs/bin/openmrsctl /etc/init.d/openmrsctl > update-rc.d openmrsctl defaults

8. Fire up OpenMRS
> /etc/init.d/openmrsctl start

9. Login
In a browswer, go to http:// :8080/openmrs

10. Check your modules
You will need to configure and start your installed modules here: http:// :8080/openmrs/admin/modules/module.list

Install Script
I have made a quick&dirty install script that does most of this work for you.

NOTE:I haven't put much error checking in it so use at your own risk.


 * 1) Unpack tarball into a good directory (/opt, /usr/local etc...) as described above in steps 3 & 4
 * 2) As root (or with sudo) run openmrs/install/install_openmrs.sh
 * 3) When prompted, enter your MySQL password (or just 'enter' if the password is blank). You will be asked twice

How to update Tarbar to new releases
1. Untar tarball 2. Replace "openmrs/webapps/openmrs.war" with a new WAR file 3. Replace/add/remove modules from "openmrs/modules" 4. Create a NEW "db.dump" Dump.db is _not_ a schema building script like the standard ones that come with the releases. It is a live-data dump for a fully up-to-date database.

To create it, simply run "openmrs/bin/dumpdb.sh db.dump" on a system running the version of the DB that matches your new WAR file.

Then place "db.dump" in "openmrs/install" 5. Create a new tarball > tar -xvzf openmrs-.tar.gz openmrs