Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Step 1: Install Firefox



Step 2: Install JAVA

Ubuntu

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

sudo apt-get install openjdk-6-jdk

or automatically as a dependency of Tomcat

sudo apt-get install tomcat6

Other Operating Systems

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


Step 3: Install Tomcat

Other operating systems

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

    sudo useradd tomcat6
    cd /opt
    sudo tar zxvf apache-tomcat-6.0.29.tar.gz
    sudo ln -s apache-tomcat-6.0.29 tomcat6
    sudo chown tomcat6.tomcat6 apache-tomcat-6.0.29

    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"/>

    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

    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 file: Find "TOMCAT6_SECURITY=yes" and change it to "TOMCAT6_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:root /usr/share/tomcat6/.OpenMRS

    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

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

  1. Install the MySQL server package: sudo apt-get install mysql-server
  2. Enter a root password
  • No labels