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-8-jdk |
or automatically as a dependency of Tomcat
sudo apt-get install tomcat7 |
Other Operating Systems
- Download Java 8 release version 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 7.0.99
Unpack the zip file to a suitable location such as /opt on Linux or /Library on Mac OSX
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.99Open 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.Run the following command from a terminal
sudo apt-get install 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/tomcat7 file: Find "TOMCAT7_SECURITY=yes" and change it to "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 tomcat7:root /usr/share/tomcat7/.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)
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 directoryJetty 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
- Install the MySQL server package: sudo apt-get install mysql-server
- Enter a root password