Versions Compared

Key

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

Introduction

This guide is all about building deploying OSCAR from source and deploying in the most minimalist way not using the DEB packaging. Why? You may want to customize how the system is deployed to better match your current processes. Being able to quickly change Java and Tomcat versions can also be a benefit of this type of install.

Prerequisites

You'll need more skills than the DEB installation. Make sure you're well versed with

  1. Linux Linux 14.04 install
  2. GIT
  3. MySQL
  4. Tomcat7

Getting and building the source code

...

Install mysql

Generally, it's best to stick to the Ubuntu packages. When you install mysql from Ubuntu 14.04.5 you get MySQL 5.5 which is what OSCAR EMR has been mostly used against in the real world. Be prepared for some potential problems if you go for Ubuntu 16.04 at the time of writing.


Code Block
languagebash
sudo apt-get install mysql-server

Install Java

The best thing to do is to install the ORACLE JRE from the binary package into a single directory, and then softlink to it. Then it's easy to update Java at any time without having to 

  1. Uninstall your current installation
  2. Change environment variables

Begin by downloading the Java SE Development Kit 8 for your Architecture (tar.gz) and installing it in /opt. Note that your versions/directory could be different.

Code Block
languagebash
sudo tar -xzvf jdk-8u121-linux-x64.tar.gz -C /opt
sudo ln apt-get install git #if you don't have git installed, run this


git clone https://git.code.sf.net/p/oscarmcmaster/oscar-s /opt/jdk1.8.0_121 /opt/java


Update your Environment 

Code Block
languagebash
echo "export JAVA_HOME=/opt/java" >> ~/.profile 
echo "export PATH=\$JAVA_HOME/bin:\$PATH" >> ~/.profile
source ~/.profile


Check that you're all good

Code Block
languagebash
$java -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)



Install Apache Tomcat

Apache Tomcat installs can be done in very much the same way we handled Java installations. Download the latest Tomcat from Apache. You're going to want the latest 8.0.x binary distribution (.tar.gz) as of the date on this document.

Follow the following commands, changing the versions where it makes sense.

Note: This isn't meant for a production environment or anything. Remember minimalist approach.

Code Block
languagebash
sudo tar -xzvf apache-tomcat-8.0.41.tar.gz -C /opt
sudo ln -s /opt/apache-tomcat-8.0.41 /opt/tomcat
sudo chown -R marc:marc /opt/apache-tomcat-8.0.41 #replace marc:marc with your username:group..whoami


Start it up

Code Block
languagebash
$/opt/tomcat/bin/startup.sh 
Using CATALINA_BASE:   /opt/tomcat
Using CATALINA_HOME:   /opt/tomcat
Using CATALINA_TMPDIR: /opt/tomcat/temp
Using JRE_HOME:        /opt/java
Using CLASSPATH:       /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar
Tomcat started.


Access it at http://localhost:8080/ (or whatever IP you're using)