Global Open Versity eHealth Labs Install Guide OSCAR McMaster CMS on Ubuntu 10.04 LTS v1.5

Global Open Versity e-Health Management Systems Hands-on Labs Training Manual

Step-by-Step Install Guide OSCAR McMaster CMS on Linux Ubuntu 10.04 LTS (Lucid Lynx)

Kefa Rabah Global Open Versity, Vancouver Canada [email protected] www.globalopenversity.org

Table of Contents Page No.

STEP-BY-STEP INSTALL GUIDE OSCAR MCMASTER CMS ON LINUX UBUNTU 10.04 LTS 3

1.0 Introduction 3

Part 1: Install & Configure Linux Ubuntu 10.04 LTS Desktop 4 Step 1: Getting Started & Hardware Pre-requisites 4 Step 2: Install Linux Ubuntu 10.04 LTS 4 Step 3: Update Ubuntu 10.04 Operating Systems 4

Part 2: Installing OSCAR McMaster CMS on Linux Ubuntu 8.04 LTS Server 5 Step 1: Preamble 5

Part 3: Installing the Infrastructure Packages 6 Step 1: Install OpenSSH Package 6 Step 2: Install Sun-Java6-JDK Package 7 Step 3: Install Ant Package 8 Step 4: Install MySQL Database Server Package 8 Step 5: Install 6 Package 9 Step 6: Install Pretty Good Privacy (PGP) Package 9 Step 7: Install CVS 10 Step 8: Install PostgreSQL database server 10 Step 9: Install UNZIP Package 10 Step 10: Install Network Time Protocol (NTP) Service 11 Step 11: Reboot the server 11 Step 12: Configuring the Base Packages 11 Step 13: Configuring Tomcat6 12 Step 14: Secure Apache Tomcat6 using SSL 13

Part 5: Install OSCAR CMS Server 15 Step 1: Download & Install OSCAR 15 Step 2: Create OSCAR Database on MySQL 16

Part 6: Enabling New eCharts 18 Step 1: Enable eChart 18

Part 7: Drugref2/3 19 Step: 1: Install Required Packages 19 Step: 2: Create Drugref Database 19 Step: 3: Download and install Drugref2 20 1 April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org CCT301 - OSCAR EMR CMS eHealth Solutions Global Open Versity eHealth Labs Install Guide OSCAR McMaster CMS on Linux Ubuntu 10.04 LTS v1.5

Part 8: Time to try OSCAR 23

Part 9: Configure OSCAR Backup 27 Step 1: Create OSCAR Backup Directory 27 Step 2: Restoring OSCAR from a Backup 30

Part 10: Getting Started With OSCAR CMS 30 Step 1: Configuring Forms 30 Step 2: Enabling Flowsheets 32

Part 11: Migrating OSCAR to a Latest Version 34 Step 1: Backup your old OSCAR EMR Data 34

Part 12: Adding a New Provider to OSCAR EMR 35 Step 1: Add a New Provider 35 Step 2: Assigning Security Role to a New Provider 38 Step 3: Unlocking the New Provider Account 40

Part 13: Adding a New Demographic Record to OSCAR EMR 41 Step 1: Add a New Demographic Record 41 Step 2: Booking Appointment 45 Step 3: Viewing Patient’s Billing History 46

Part 14: Need More Training on Linux 47 OSCAR EMR CMS e-Health Information Mgmt Solution Training 47

Part 15: Hands-on Labs Assignments 47

References 48

Troubleshooting 48

Linux Training Error! Bookmark not defined.

http://creativecommons.org/licenses/by-nc-sa/3.0/ A GOV Open Access Technical Academic Publications Enhancing education & empowering people worldwide through eLearning in the 21st Century 2 April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org CCT301 - OSCAR EMR CMS eHealth Solutions Global Open Versity eHealth Labs Install Guide OSCAR McMaster CMS on Linux Ubuntu 10.04 LTS v1.5

Global Open Versity e-Health Management Systems Hands-on Labs Training Manual

Step-by-Step Install Guide OSCAR McMaster CMS on Linux Ubuntu 10.04 LTS

By Kefa Rabah, [email protected] May 17 2010 GTS Institute

1.0 Introduction In this Hands-on Labs session, we’re going to use the Linux Ubuntu 10.04 LTS (Lucid Lynx) Desktop option. Canonical has high hopes that Ubuntu 10.04, Lucid Lynx, will easily become the platform of choice for anybody who intends to build and deploy large-scale infrastructure, whether you're trying to build the next Facebook, or the next Google, or the next eBay. If you want to start on [Amazon's cloud-platform] EC2 and migrate to your own managed private cloud, Ubuntu 10.04 is going to be the platform for you. Lucid Lynx will be the third long-term support (LTS) release by Ubuntu. LTS releases arrive bi-annually and are supported for three years on desktops and five years for servers of free security and maintenance updates.

Ubuntu 10.04 LTS Server Edition: Lean, fast and powerful – Ubuntu Server delivers services reliably, predictably and economically - and easily integrates with your existing infrastructure. It has almost 100 open-source and proprietary application providers certifying their programs on Ubuntu Server Edition. Ubuntu 10.04 includes Alfresco, Ingres, IBM, VMware, Yahoo and Zimbra. It also includes improved installation and management tools for Ubuntu Enterprise Cloud (UEC) and Amazon EC2.

Ubuntu 10.04 LTS desktop Edition: The desktop CD allows you to try Ubuntu without changing your computer at all, and have an option to install it permanently later. This type of CD is what most people will want to use. You will need at least 256MB of RAM to install from this CD for general purpose installation. While for the server, the server install CD allows you to install Ubuntu permanently on a computer for use as a server. It will not install a graphical user interface.

OSCAR McMaster can be installed on a Desktop for single user or on two or more servers and deployed in a redundant configuration to provide maximum resiliency in support of your practice. For the adventurous who are interested in this topic, they can build two identical OSCAR servers, and then search the internet on how to configure MySQL replication for the database, rsync for the filesystem, and cron for the automation. These utilities/tools will allow you to tie your two or more OSCAR servers together.

Solution: In this Hands-on Lab session, you’ll learn how to setup virtual network on VMware (you may also use any other virtual machines like MS VirtualPC, Linux Xen, or VirtualBox from Sun). In this lab session, we’ll concentrate on installing Linux Ubuntu 10.04 LTS which you can then later use to install any other applications as desired. In this lab session, you use the as installed Ubuntu 10.04 install OSCAR v9.12. You’ll learn how to update Ubuntu server, install and configure required packages and applications need to run OSCAR, e.g., Sun JDK6, Apache Tomcat application server, MySQL database server, and OpenSSH server. You’ll learn how to secure your OSCAR server using SSL connection. You will also learn how to setup OSCAR backups using Cron command on your local machine or on a remote server 3 April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org CCT301 - OSCAR EMR CMS eHealth Solutions Global Open Versity eHealth Labs Install Guide OSCAR McMaster CMS on Linux Ubuntu 10.04 LTS v1.5

off-site, and how to restore you backups. Finally, you will learn how to perform some simple configuration tasks on your as-installed OSCAR server. Upon completion of this lab session, you should have acquired a capability and skills that will allow you to plan, design implement and deploy OSCAR eHealth system on Linux Ubuntu machine.

Part 1: Install & Configure Linux Ubuntu 10.04 LTS Desktop

Step 1: Getting Started & Hardware Pre-requisites Ubuntu runs on inexpensive, commodity hardware. To support a small practice like OSCAR, web-server etc., we recommend a minimum configuration of 200Gb Disk, 2Gb RAM, and a 2GHz Intel Dual Core CPU. For maximum subsystem compatibility, we suggest that you install the 32bit version of Ubuntu. If you are purchasing a computer to run OSCAR, one option is to order the machine with Ubuntu pre- installed.

In this lab we have installed OSCAR 9.12 on Ubuntu 10.04 LTS Desktop edition with 1224MB RAM and 222GB disk space running on a virtual machine installed on two core CPU PC.

In this Hands-on Labs, it’s assumed that your target computer is connected to the internet. After installing the operating system, log into your machine and ensure you perform software updates to bring your systems up-to-date.

Step 2: Install Linux Ubuntu 10.04 LTS 1. Hope over to http://releases.ubuntu.com/releases/10.04/ website and download the Linux Ubuntu 10.04 package PC (Intel x86) desktop CD, which at the time of writing this lab manual was "Ubuntu-10.04-desktop-i386.iso"

2. Once you have downloaded the Ubuntu ISO specific to your distribution, you have the option burning it into CD or just by using the ISO package to install it from your virtual machine, in our case VMware. 3. Fire-up a new virtual machine and perform the initial configuration and setup to use ISO package. 4. Start the virtual machine, and you should be able to see the first Ubuntu installation screen. 5. Select the option desired and then hit the Enter key to commence installation. In our case we have selected to Install Ubuntu. 6. The complete installation of the base operating system is beyond the scope of this document. However, in case you are having trouble with installation then hope over and check an article by same author “Install Guide Linux Ubuntu 10.04 LTS (Lucid Lynx)”. 7. We’re done with this section

Step 3: Update Ubuntu 10.04 Operating Systems For IT best practices, it is recommended that you update your system with the latest components and system patches immediately after a fresh install. The first command below asks Ubuntu to update its database of available packages, and the second command installs the latest packages based on your

4 April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org CCT301 - OSCAR EMR CMS eHealth Solutions Global Open Versity eHealth Labs Install Guide OSCAR McMaster CMS on Linux Ubuntu 10.04 LTS v1.5

current configuration. You can run the upgrade command twice to ensure that any packages that may have post-upgrade dependencies also have an opportunity to be upgraded.

1. From the command line, enter the following commands, one at a time.

$ sudo apt-get update $ sudo apt-get -u upgrade

Note 1: The sudo command is used to run privileged operations on the Ubuntu platform. The first time you run the command, it will ask for your password. Subsequently, it will not ask for your password again for a short period of time (typically 15 minutes).

Note 2: apt-get is the program Ubuntu uses for managing the system’s packages. When used to manipulate the core packages of the operating system, it needs to be run in conjunction with the sudo command.

2. We’re done with this section

3. We are now ready to begin the instillation of the packages required for OSCAR on Linux Ubuntu.

Part 2: Installing OSCAR McMaster CMS on Linux Ubuntu 8.04 LTS Server In this tutorial we’ll take you through a step-by-step installation of the OSCAR McMaster Clinical Management System (CMS), using the Ubuntu 10.04 Long Term Support (LTS) operating system (Lucid Lynx).

Note: As this is a mission machine server, we recommend utilizing the latest Ubuntu LTS version as the foundation for your OSCAR installation, as this will deliver the most trouble free and stable platform for your OSCAR.

As was mentioned earlier, OSCAR can be installed on a desktop machine for single user or on two or more servers and deployed in a redundant configuration to provide maximum resiliency in support of your practice. The instructions to install a redundant server configuration are beyond the scope of this tutorial. However, for the adventurous who are interested in this topic, build two identical OSCAR servers, and then search the internet on how to configure MySQL replication for the database, rsync for the filesystem, and cron for the automation. These utilities/tools will allow you to tie your two or more OSCAR servers together.

Note: The OSCAR McMaster project, Copyright © 2001 McMaster University, is distributed under the terms of the GNU General Public License version 2 (GPLv2).

Step 1: Preamble These instructions are written for an audience comfortable with invoking instructions from the command line and GUI option. If you are capable of installing the user friendly Ubuntu GNU/Linux operating system or any other Linux distros, then you should be able to follow along with ease.

5 April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org CCT301 - OSCAR EMR CMS eHealth Solutions Global Open Versity eHealth Labs Install Guide OSCAR McMaster CMS on Linux Ubuntu 10.04 LTS v1.5

At the time of writing this lab manual, this installation was tested with the following standard Ubuntu 10.0 LTS distro packages:

ƒ Ubuntu 10.04 i386 (32 bit, desktop or server). In our case, we have used the Desktop option. ƒ tomcat 6 ƒ 5.1.41-3Ubuntu12 (use: myql –uroot -****) ƒ java version 1.6.0_20 (Sun’s JDK6) (use: java –version) ƒ javac version 1.6.0_20 (use: javac –version) ƒ Ant version 1.7.1 (use: ant –version)

Part 3: Installing the Infrastructure Packages

Step 1: Install OpenSSH Package In order to support secure remote connections to your server, you will need to install the OpenSSH package. This package will come in handy in the future to support administrative tasks on the system. By default this package is already installed in the Ubuntu server option.

1. To install OpenSSH, issue the following command:

$ sudo apt-get install openssh-server -y

2. To log into a remote computer that is running OpenSSH, you use the "ssh username@hostname" command, replacing username with a valid user name on the computer you are trying to log into, and replacing hostname with either the fully qualified host name (e.g. example.com) of your server, or it’s IP address (e.g. 192.168.83.225).

3. For example, let’s login remotely to server via SSH as user Sarah Craig (scraig) with password xxxxx and IP address 192.168.83.188, run:

ssh [email protected]

Note 1: you’ll be asked to respond to yes/no and also enter scraig’s password. And as you can observe we have successfully remotely logged in as user scraig. Now you can use your usual Linux commands to remotely manage your Linux server. When done type exit command and hit enter to logout.

6 April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org CCT301 - OSCAR EMR CMS eHealth Solutions Global Open Versity eHealth Labs Install Guide OSCAR McMaster CMS on Linux Ubuntu 10.04 LTS v1.5

Fig. 1

Note: for those using Windows based systems, they can install PuTTY: a free telnet/ssh client.

4. You’re done with this section.

Step 2: Install Sun-Java6-JDK Package It’s important to note that OSCAR is predominately written in the Java programming language and thus requires the Java SDK to be built from source. The Java SDK also supports the Tomcat web framework.

1. The following command install Java, plus fixes a bug in its default installation program:

$ sudo apt-get install sun-java6-jdk -y

Note: The server will need to be rebooted to catch this fix, but we will do this later.

2. Read the License agreement, and then hit the Tab key to select and then hit Enter key. 7 April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org CCT301 - OSCAR EMR CMS eHealth Solutions Global Open Versity eHealth Labs Install Guide OSCAR McMaster CMS on Linux Ubuntu 10.04 LTS v1.5

3. Next, Read the license and then select the and then hit the Enter key to accept the license and install the jdk6. 4. Finally, issue the ldconfig command

$ sudo ldconfig

Note: ldconfig creates the necessary links and cache to the most recent shared libraries found in the directories specified on the command line.

5. We’re done with this section.

Step 3: Install Ant Package The source code compilation process for OSCAR is managed by the Ant package.

1. To install Ant package, issue the following command:

$ sudo apt-get install ant-optional

2. We’re done with this section

Step 4: Install MySQL Database Server Package Your specific OSCAR CMS data, profiles, and information will all be stored in the MySQL database. This installation sequence for MySQL will ask you for a secure password for the database server – remember this password as you will need it again later in the installation.

1. To install MySQL database server, issue the following command:

$ sudo apt-get install mysql-server libmysql-java

2. When prompted, enter a new root user password, as shown in Fig. 2. Hit the Tab key to select , and then hit the Enter key. Repeat the password when prompted.

8 April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org CCT301 - OSCAR EMR CMS eHealth Solutions Global Open Versity eHealth Labs Install Guide OSCAR McMaster CMS on Linux Ubuntu 10.04 LTS v1.5

Fig. 2

Warning!: Do not forget the password entered here, as it’ll be required later to login to the MySQL database server.

3. Finally, issue the ldconfig command

$ sudo ldconfig

4. We’re done with this section.

Step 5: Install Apache Tomcat 6 Package To support OSCAR’s web based user interface, the system leverages the extensive resources of the Apache Tomcat web application framework.

1. To install Apache Tomcat 6 web application framework, issue the following command:

sudo apt-get install tomcat6 tomcat6-admin sudo ln -s /usr/share/tomcat6 /usr/local/tomcat

1. Test that Apache Tomcat is successfully installed, start your browser and enter the URL: http://localhost:8080. Try port 8180 if 8080 doesn’t work. (Note: If you’re using Ubuntu 8.04.4 LTS, you browser might render a blank page, its ok don’t worry, so long as it didn’t return an error, you’re good to go!)

2. We’re done with this section

Step 6: Install Pretty Good Privacy (PGP) Package At times you may be interested in encrypting your data if you’re worried of data falling into the wrong hands. Luckily OSCAR backup can be configured to use the Pretty Good Privacy subsystem.

1. To install PGP package, issue the following command:

9 April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org CCT301 - OSCAR EMR CMS eHealth Solutions