v2.0 Implementation Documentation

Hello all, So moving on … If you take the standard Sys Admin, he is going to fire up a Linux server and crack on with getting a “Dev” system up and running straight away. Basically get Tomcat, Mysql and Java set up try to drop in the .WAR and away they go. [I am aware that the ‘stand alone’ version has a Java and script for this but if they fail because of environmentals then it is good to show people how to do it all by hand] But its not that simple - such as the current .WAR is larger than the Tomcat default (> 50Mb), and so on. So here is the first thoughts on the cook script (rough draft order and logic is more important than syntax at this stage). Feedback would be appreciated on things such as setting up a OpenMRS user and DataBase in MySQL first or not … still working on step 6 onwards


Cook script V0.1

#Step 1. Install JAVA

sudo apt-get install default-jdk sudo update-alternatives --config java

#Step 2. Install MySQL

sudo apt-get install mysql-server Enter and remember your root password

#Step 3. Install Tomcat and change user security

sudo apt-get install tomcat7 sudo apt-get install tomcat7-docs tomcat7-admin tomcat7-examples default-jdk ant git sudo nano /etc/tomcat7/tomcat-users.xml

   <tomcat-users>
    <user username="<?Username?>" password="<?password?>" roles="manager-gui,admin-gui"/>
    </tomcat-users>

sudo service tomcat7 restart

#Step 4. Download openmrs.war from openmrs.org OpenMRS - Browse Files at SourceForge.net

#Step 5 : Change upload size to in Tomcat to upload openmrs.war To increase upload size limit in tomcat edit webapps/manager/WEB-INF/web.xml configuration file and search for below content.

      <max-file-size>52428800</max-file-size>
      <max-request-size>52428800</max-request-size>
      <file-size-threshold>0<</file-size-threshold>

  </multipart-config>

cd /usr/share/tomcat7-admin/manager/WEB-INF nano WEB-INF

Edit max-file-size and max-request-size and increase it as your requirement. These values are defined in bytes and the default value is set to 50Mb. (104857600 = 100MB)

      <max-file-size>104857600</max-file-size>
      <max-request-size>104857600</max-request-size>
      <file-size-threshold>0<</file-size-threshold>

  </multipart-config>

After making all above changes, You need to restart Tomcat instance

sudo /etc/init.d/tomcat7 restart

#Step 6: Set up Tomcat directory

sudo mkdir /usr/share/tomcat7/. OpenMRS sudo chown -R tomcat7 /usr/share/tomcat7/. OpenMRS

#Step 7: Setup MSQL

sudo mysqladmin --user=root ….

#Step 6 : Nav to site…… open http://<IP Address> or <localhost>:8080/OpenMRS