Step 1: Install Firefox
- Follow the instructions under https://support.mozilla.org/en-US/kb/install-firefox-linux
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
- Download the latest stable release of the Java Runtime Environment (JRE)
- Run the installer (or unzip the contents, whichever is needed)
- Accept the license agreement
Step 3: Install Tomcat
Other operating systems
- Download the zip archive of Tomcat 6.0.29
- Unpack the zip file to a suitable location such as /opt on Linux or /Library on Mac OSX
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)
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<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. - Run the following command from a terminal
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_)
sudo apt-get install tomcat6
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)<user name="admin" password="XXXXXX" roles="tomcat,admin,manager,manager-gui"/>
sudo mkdir /usr/share/tomcat6/.OpenMRS
sudo chown -R tomcat6:root /usr/share/tomcat6/.OpenMRSJetty as an alternative to Tomcat
This is meant to run in a Linux environment. - 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.
- Unpack the tar file to your preferred directory (I usually use /usr/share/jetty)
Now to make it start when you start the system and make Jetty a service
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)Edit /etc/init.d/jetty to include the following two lines after the comments so Jetty knows where your Java and Jetty directories are.sudo cp bin/jetty.sh /etc/init.d/jetty
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.JAVA_HOME=(path to java)
JETTY_HOME=/usr/share/jetty //or where your jetty installation directorysudo /etc/init.d/jetty start
- Unpack the tar file to your preferred directory (I usually use /usr/share/jetty)
Step 4: Install JAVA
Ubuntu
You can install the OpenJDK on it's own as a package
- Install the MySQL server package: sudo apt-get install mysql-server
- Enter a root password