/
Linux & Other OS

Linux & Other OS

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 Java

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

For Ubuntu:

  • Option 1: Install OpenJDK Directly

    sudo apt-get install openjdk-8-jdk
  • Option 2: Install OpenJDK as a Dependency of Tomcat

    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

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 from the official website.

  2. Unpack Tomcat:

    sudo useradd tomcat7 cd /opt sudo tar zxvf apache-tomcat-7.0.99.tar.gz sudo ln -s apache-tomcat-7.0.99 tomcat7 sudo chown tomcat7.tomcat7 apache-tomcat-7.0.99
  3. Configure Tomcat Users:

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

    • Add a user with admin and manager roles:

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

  1. Install Tomcat:

  2. Configure Tomcat Users:

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

    • Add a user with admin and manager roles:

  3. Adjust Security Settings:

    • Turn off the Tomcat security flag:

    • Find TOMCAT7_SECURITY=yes and change it to TOMCAT7_SECURITY=no.

  4. Create OpenMRS Application Data Directory:

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, which may have compatibility issues with your JDK).

  2. Unpack Jetty:

  3. Set Up Jetty as a Service:

    • Copy the Jetty startup script:

    • Edit /etc/init.d/jetty to define the paths for Java and Jetty:

  4. Start Jetty:

    • Place the openmrs.war file in /usr/share/jetty/webapps/.

    • Start Jetty using the command:

Step 5: Install MySQL

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

For Ubuntu:

  • Install MySQL:

  • Set a Root Password:

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

Related content

Step 5 - Deploy OpenMRS
Step 5 - Deploy OpenMRS
More like this
Step 3 - Install Tomcat
Step 3 - Install Tomcat
More like this
Step 4 - Install MySQL
Step 4 - Install MySQL
Read with this
Setting of OpenMRS development environment and getting started up (copy)
Setting of OpenMRS development environment and getting started up (copy)
More like this
OpenMRS from Scratch
OpenMRS from Scratch
Read with this
Step 7 - Start Using OpenMRS
Step 7 - Start Using OpenMRS
More like this