Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This guide will take you through the steps needed to install Firefox, Java, Tomcat, and Jetty, preparing your system for running OpenMRS.

Step 1: Install Firefox

Begin by installing Firefox, which will be necessary to access and manage OpenMRS.

Step 2: Install

...

Ubuntu

You can install the OpenJDK on it's own as a package

...

Java

Java is essential for running OpenMRS, and the installation process varies depending on your operating system.

For Ubuntu:

  • Option 1: Install OpenJDK Directly

    Code Block
    languagebash
    sudo apt-get install openjdk-8-jdk

...

  • Option 2: Install OpenJDK as a

...

  • Dependency of Tomcat

    Code Block
    languagebash
    sudo apt-get install tomcat7

...

For Other Operating Systems:

  • Download Java:

    • Obtain the Java 8 release version of the Java Runtime Environment (JRE) from the official site.

  • Install Java:

    • Run the installer

...

    • or unzip the contents,

...

    • depending on the provided package.

    • Accept the license agreement to complete the installation.

Step 3: Install Tomcat

Other operating systems

...

Tomcat is the application server that will run OpenMRS. You can either install it as a package or manually from a zip archive.

Option 1: Manual Installation on Other Operating Systems

  1. Download Tomcat:

    • Get the zip archive of Tomcat 7.0.99

...

Unpack the zip file to a suitable location such as /opt on Linux or /Library on Mac OSX

...

    • from the official website.

  1. Unpack Tomcat:

    Code Block
    languagebash
    sudo useradd tomcat7
    cd /opt
    sudo tar zxvf apache-tomcat-7.0.99.tar.gz

...

  1. 
    sudo ln -s apache-tomcat-7.0.99 tomcat7

...

  1. 
    sudo chown tomcat7.tomcat7 apache-tomcat-7.0.99
  2. Configure Tomcat Users:

    • Open the Tomcat users file (e.g., /opt/tomcat/conf/tomcat-users.xml)

...

    • as root:

      Code Block
      languagebash
      sudo nano /opt/tomcat/conf/tomcat-users.

...

    • xml
    • Add a user with admin and manager roles:

      Code Block
      languagexml
      <user name="admin" password="XXXXXX" roles="tomcat,admin,manager,manager-gui"/>

...

Run the following command from a terminal

...

Option 2: Installation as a Debian Package (Not Recommended)

  1. Install Tomcat:

    Code Block
    languagebash
    sudo apt-get install tomcat7
  2. Configure Tomcat Users:

    • Open the Tomcat users file (e.g., /etc/tomcat/tomcat-users.xml)

...

    • as root:

      Code Block
      languagebash
      sudo nano /etc/tomcat/tomcat-users.xml

...

    • Add a user with admin and manager roles:

      Code Block
      languagexml
      <user name="admin" password="XXXXXX" roles="tomcat,admin,manager,manager-gui"/>
  1. Adjust Security Settings:

    • Turn off

...

    • the Tomcat security flag

...

    • :

      Code Block
      languagebash
      sudo nano /etc/init.d/tomcat7

...

    • Find

...

    • TOMCAT7_SECURITY=yes

...

    • and change it to

...

    • TOMCAT7_SECURITY=no

...

    • .

  1. Create OpenMRS

...

  1. Application Data Directory:

    Code Block
    languagebash
    sudo mkdir /usr/share/tomcat6/.OpenMRS

...

  1. 
    sudo chown -R tomcat7:root /usr/share/tomcat7/.OpenMRS

...

Step 4: Install Jetty (Alternative to Tomcat)

Jetty is another application server option for running OpenMRS, particularly in a Linux environment.

...

Jetty Installation Steps

  1. Download Jetty:

    • Obtain Jetty 7.4.5

...

    • from the official site (avoid version 7.5.4

...

Unpack the tar file to your preferred directory (I usually use /usr/share/jetty)

...

    • , which may have compatibility issues with your JDK).

  1. Unpack Jetty:

    Code Block
    languagebash
    sudo mkdir /usr/share/jetty

...

  1. 
    cd /usr/share/jetty

...

  1. 
    sudo mv /path/to/

...

  1. jetty/jetty-distribution-(version).tar.gz .

...

  1. 
    sudo tar xfz jetty-distribution-(

...

  1. version).tar.gz

...

  1. 
    sudo mv jetty-distribution-(version)/* .

...

  1. 
    sudo rm -rf jetty-distribution(version)

Now to make it start when you start the system and make Jetty a service

  1. Set Up Jetty as a Service:

    • Copy the Jetty startup script:

      Code Block
      languagebash
      sudo cp bin/jetty.sh /etc/init.d/jetty
    • Edit /etc/init.d/jetty to

...

    • define the paths for Java and Jetty:

      Code Block
      languagebash
      JAVA_HOME=

...

    • /path/to/java

...

    • 
      JETTY_HOME=/usr/share/jetty

...

    •   // or

...

    •  your

...

    •  Jetty installation directory

...

  1. Start Jetty:

    • Place the openmrs.war file in

...

    • /usr/share/jetty/webapps/

...

    • .

    • Start Jetty using the command:

      Code Block
      languagebash
      sudo /etc/init.d/jetty start

Step

...

5: Install

...

Ubuntu

You can install the OpenJDK on it's own as a package

...

MySQL

Finally, you need to set up a MySQL database to store the OpenMRS application data.

For Ubuntu:

  • Install MySQL:

    Code Block
    languagebash
    sudo apt-get install mysql-server
  • Set a Root Password:

    • During installation, you will be prompted to enter a root password. Remember this for configuring OpenMRS.