Step 1: Install Firefox
- Follow the instructions under https://support.mozilla.org/en-US/kb/install-firefox-linux
...
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 |
Anchor | ||||
---|---|---|---|---|
|
- Download the latest stable Java 8 release version of the Java Runtime Environment (JRE)
- Run the installer (or unzip the contents, whichever is needed)
- Accept the license agreement
...
Other operating systems
- Download the zip archive of Tomcat 67.0.2999
Unpack the zip file to a suitable location such as /opt on Linux or /Library on Mac OSX
tomcat6sudo useradd
6tomcat7
cd /opt
sudo tar zxvf apache-tomcat-
297.0.
699.tar.gz
sudo ln -s apache-tomcat-
29 tomcat67.0.
tomcat699 tomcat7
sudo chown
tomcat6tomcat7.
6tomcat7 apache-tomcat-
297.0.
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"/>
As a Debian packageThis is not recommended as it may install a version of Tomcat which is not compatible with OpenMRS.Anchor Step3-InstallTomcat-AsaDebianpackage Step3-InstallTomcat-AsaDebianpackage Run the following command from a terminal
tomcat6sudo 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/
tomcat6tomcat7 file: Find "
TOMCAT6TOMCAT7_SECURITY=yes" and change it to "
TOMCAT6TOMCAT7_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)
tomcat6sudo mkdir /usr/share/tomcat6/.OpenMRS
sudo chown -R
tomcat6tomcat7:root /usr/share/
tomcat7/.OpenMRS
Jetty as an alternative to TomcatThis is meant to run in a Linux environment.Anchor Step3-InstallTomcat-Jettyasanalternative Step3-InstallTomcat-Jettyasanalternative - 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
...