The following process describes how to upgrade Java and Tomcat to work with OpenClinica 3.3 on Linux. Be sure to back up your database before starting the upgrade process.

Before you begin, the following packages should be installed with your Linux operating system:
    vim
    unzip
    tar
(eg:~# yum install vim)

You will require “root” user access to your operating system. Run all commands in this guide with a user account possessing root-level permissions.

9.3.1 Upgrade Java 6 to Java 7

9.3.1.1 Preconditions for Upgrading Java

  1. Access OpenClinica at the following URL:
    http://localhost:8080/OpenClinica
    The Login page should display.
  2. Verify the current version of Java is Java 6 by running this command:

    /usr/local/java/jre/bin/java version

 9.3.1.2 Upgrade Java 6 to Java 7

a. For 32-bit operating systems, to get the files from OpenClinica, run:

    wget https://dev.openclinica.com/oc/software/OpenClinica-3.2/linux/jdk-7u51-linux-i586.gz

b. For 64-bit operating systems, to get the files from OpenClinca, run:

    wget https://dev.openclinica.com/oc/software/OpenClinica-3.2/linux/jdk-7u51-linux-x64.gz

The OpenClinica software is written in the Java programming language, so you must have Java installed on your system in order to run the OpenClinica application.

  1. Install Java by running:

    tar -xvf jdk-7u51-linux-x64.tar.gz     

    chown R root:root jdk1.7.0_51

    chmod a+x jdk-7*     

  2.  To install the Java in operating system by running
            
    mv jdk1.7* /usr/local/
            
    ln -s /usr/local/jdk1.7* /usr/local/java

    Java is now installed in the correct location. 

9.3.1.3 Verify Java 7 is installed

  1. Verify the current version of the Java is Java 7 by running these commands in root:
  2. /usr/local/java/jre/bin/java version
  3. Access OpenClinica at the following URL:
    http://localhost:8080/OpenClinica
    The Login page should display.

 9.3.2 Upgrade Tomcat 6 to Tomcat 7

9.3.2.1 Preconditions for Upgrading Tomcat

  1. Access OpenClinica at the following URL:
    http://localhost:8080/OpenClinica
    The Login page should display.
  2. Stop Tomcat 6 by running the following command:

    service tomcat stop

  3. Uninstall Tomcat 6 from your system (including all the configuration files).

    rm i /usr/local/tomcat

    rm irf /usr/local/apache-tomcat-6.0.32

9.3.2.2 Install Tomcat 7

  1. The OpenClinica software uses the Apache Tomcat Java application server. Download Tomcat 7 from one of the following sites and copy it into the local folder /usr/local/oc/install/
    Download it from the Tomcat website: http://tomcat.apache.org/download-70.cgi
    – or –
    Download it from the OpenClinica website:  https://dev.openclinica.com/oc/software/OpenClinica-3.2/linux/apache-tomcat-7.0.52.tar.gz
    Run the following command in /usr/local/oc/install/ to install Tomcat 7.
    wget https://dev.openclinica.com/oc/software/OpenClinica-3.2/linux/apache-tomcat-7.0.52.tar.gz
  2. The current directory on your system should be /usr/local/oc/install. If it is not, make it the current directory by running:
    cd /usr/local/oc/install
  3. Install Tomcat by running the following:

    tar -xvf apache-tomcat-7*

    mv apache-tomcat-7.0.52 /usr/local/

    ln -s /usr/local/apache-tomcat-7.0.52 /usr/local/tomcat

    (Note: The system will prompt you to enter your UNIX password. Use tomcat as the password, and press enter for all the default value for the full name, room number, phone, home phone and other. Is the info correct? Type Y and enter.)

  4. Move the web apps provided with Tomcat that are not needed by OpenClinica to another location by running:

    mkdir /usr/local/tomcat/oldwebapps

    mv /usr/local/tomcat/webapps/* /usr/local/tomcat/oldwebapps

    Tomcat is now installed and you can set Tomcat to automatically start when you start your system, or you can start Tomcat manually by issuing commands.

    To set Tomcat to start automatically on system startup, run the following: (Note: Before running the command install the OpenClinica 3.3 on your install folder)

    cp /usr/local/oc/install/OpenClinica-3.3*/install-docs/linux/tomcat /etc/init.d/

    chmod a+x /etc/init.d/tomcat

    /sbin/chkconfig –add tomcat

    (Note: This command is only for Red Hat Linux. For other operating systems, see the operating system instructions for adding an init script.)

  5. Update the File Path parameter to the correct value

    chown -R tomcat /usr/local/tomcat/*

    chown -R tomcat /usr/local/apache-*

9.3.2.3 Deploy the OpenClinica Software Package

Download the OpenClinica software package, OpenClinica 3.3.tar.gz, from the OpenClinica website: https://community.openclinica.com/project/openclinica. To download the software, you need a community account, which is free to create. You will be required to log in to the account in order to download the OpenClinica software.

        First, make sure Tomcat is stopped:

  1. Stop Tomcat 7 by running:
    service tomcat stop
  2. The current directory on your system should be /usr/local/oc/install. If it is not, make it the current directory by running:
    cd /usr/local/oc/install
  3. Run each of the following commands:

    unzip OpenClinica 3.3*

    cd OpenClinica 3.3*/distribution

    unzip OpenClinica.war -d OpenClinica

    cp -rf OpenClinica* /usr/local/tomcat/webapps

    rm -f /usr/local/tomcat/webapps/OpenClinica

    OpenClinica is now deployed for use with the database.

9.3.2.4 Verify Tomcat 7 is Started and the Application is Running

  1. Start Tomcat:
    service tomcat start
    (Note: Replace start with stop to stop the Tomcat service)
  2. Verify Tomcat 7 is running with the following commands. You should see a similar message as shown in the bracket().
    service tomcat status  (Tomcat is running)
  3. Access OpenClinica at the following URL:
    http://localhost:8080/OpenClinica
    The Login page should display.