Versions Compared

Key

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

Step 1: Install Firefox

...

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

sudo apt-get install openjdk-

6

8-jdk

or automatically as a dependency of Tomcat

sudo apt-get install

tomcat6

tomcat7

Anchor
Step2-InstallJava-OtherOperatingSystems
Step2-InstallJava-OtherOperatingSystems
Other Operating Systems

  1. Download the latest stable Java 8 release version of the Java Runtime Environment (JRE)
  2. Run the installer (or unzip the contents, whichever is needed)
  3. Accept the license agreement

...

Other operating systems

  1. Download the zip archive of Tomcat 67.0.2999
  2. Unpack the zip file to a suitable location such as /opt on Linux or /Library on Mac OSX

    sudo useradd

    tomcat6

    tomcat7
    cd /opt
    sudo tar zxvf apache-tomcat-

    6

    7.0.

    29

    99.tar.gz
    sudo ln -s apache-tomcat-

    6

    7.0.

    29 tomcat6

    99 tomcat7
    sudo chown

    tomcat6

    tomcat7.

    tomcat6

    tomcat7 apache-tomcat-

    6

    7.0.

    29

    99

    Open the Tomcat users file (e.g. /opt/tomcat/conf/tomcat-users.xml) in a text editor. Create a new user called admin with the roles admin,manager and manager-gui. This file should be protected so you will need to open it as root (e.g. sudo nano /opt/tomcat/conf/tomcat-users.xml)

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


    Anchor
    Step3-InstallTomcat-AsaDebianpackage
    Step3-InstallTomcat-AsaDebianpackage
    As a Debian package

    This is not recommended as it may install a version of Tomcat which is not compatible with OpenMRS.
  3. Run the following command from a terminal

    sudo apt-get install

    tomcat6

    tomcat7

    Open the Tomcat users file (e.g. /etc/tomcat/tomcat-users.xml) in a text editor. Create a new user called admin with the roles admin,manager and manager-gui. This file should be protected so you will need to open it as root (e.g. sudo nano _/etc/tomcat/tomcat-users.xml_)

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

    Turn off tomcat security flag in /etc/init.d/

    tomcat6

    tomcat7 file: Find "

    TOMCAT6

    TOMCAT7_SECURITY=yes" and change it to "

    TOMCAT6

    TOMCAT7_SECURITY=no"Create OpenMRS application data directory and make it writable by Tomcat: (so that the runtime properties file can be written by the webapp during initial startup)

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

    tomcat6

    tomcat7:root /usr/share/

    tomcat6

    tomcat7/.OpenMRS


    Anchor
    Step3-InstallTomcat-Jettyasanalternative
    Step3-InstallTomcat-Jettyasanalternative
    Jetty as an alternative to Tomcat

    This is meant to run in a Linux environment.
  4. Download the Jetty 7.4.5 tar.gz from here. Don't download 7.5.4; it may not recognize the jdk that you have installed.
    1. Unpack the tar file to your preferred directory (I usually use /usr/share/jetty)

      sudo mkdir /usr/share/jetty
      cd /usr/share/jetty
      sudo mv /pathtojetty/jetty-distribution-(version).tar.gz .
      sudo tar xfz jetty-distribution-(verstion).tar.gz
      sudo mv jetty-distribution-(version)/* .
      sudo rm rf jetty-distribution(version)

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

      sudo cp bin/jetty.sh /etc/init.d/jetty

      Edit /etc/init.d/jetty to include the following two lines after the comments so Jetty knows where your Java and Jetty directories are.

      JAVA_HOME=(path to java)
      JETTY_HOME=/usr/share/jetty  //or where your jetty installation directory

      Jetty is now officially installed and can be run as a service. Now you can run Jetty by using the following command. First put the openmrs.war in to /usr/share/jetty/webapps/ so Jetty will know to run the war.

      sudo /etc/init.d/jetty start


Step 4: Install JAVA

Ubuntu

...