Between last Thursday and this morning, I installed a working copy of OpenMRS (changeset 1825). Since I’m working as a developer rather than as an implementer, I followed those instructions (truth be told, I used a combination of the two instructions to figure out some of the problems).
The first step is the “pre-requisites,” namely the Java JDK, MySQL, Ant, Tomcat, Eclipse, and Subversion. I installed these via some terminal commands using ubuntu’s package manager (e.g., sudo aptitude install subversion). These all finished, so I moved on.
The second step is checking out a copy of the code from the alpha branch, and building that with ant. Checking out code was fine, but the command ant install gave me many problems. This was Thursday night, and I was working with in-development code, so I gave up for the moment, and hoped that over the weekend it would be fixed, and didn’t bother myself with it for a while, since I had a wedding to attend over the weekend. Back on Sunday night, I still could not get it to work with updated code. I assumed that it was a problem on my end, and deduced from the error and line of code in which it failed that I had a Tomcat problem.
My main problem was that tomcat was not running. Ubuntu 7.04 apparently has a bug in the tomcat init.d script that, for whatever reason, makes the service not fully start. There is no error, just a lack of starting. I fixed this, and confirmed that tomcat was starting and continued to stay started. However, it still would not work, and failed on the same line. I could not actually connect to the tomcat server via my browser either, so I gave up on the Ubuntu-packaged tomcat and followed instructions on installing tomcat 6 directly, including editing users and adding the following lines to /usr/share/tomcat6/conf/tomcat-users.xml:
<tomcat-users><role rolename="manager"/>
<role rolename="tomcat"/>
<role rolename="admin"/>
<user username="tomcat" password="tomcat" roles="admin,manager,tomcat"/>
<user username="root" password="my-root-password" roles="admin,manager,tomcat"/>
<user username="test" password="test" roles="admin,manager,tomcat"/>
</tomcat-users>
After struggling with users in tomcat like this, I finally was able to finish running ant install.
For step 3, the SQL databases, I did as such, after figuring out how to run the sql files. I’m really just glad I remembered my MySQL root password. In any case, I set up MySQL with not too much trouble. At least compared to my tomcat problems.
The biggest problems I encountered were just myself not knowing how to correctly install and configure Tomcat and MySQL on an Ubuntu system. A few small changes are needed to the Step-by-Step Installation for Developers page on the OpenMRS wiki, but nothing too drastic. After getting the pre-requisites actually fulfilled, a developers’ install of OpenMRS is quite easy.
Heya Rudd, looks like you and Sashikanth should get together and write up a “flavor” guide for Ubuntu:
http://openmrs.org/wiki/User:Sdamaraju
Thanks for writing about it!