Use the following process to upgrade the Java and Tomcat for Linux to work with the OpenClinica 3.2. Follow each step sequentially to update Tomcat 6 and Java 6 to Tomcat 7 and Java 7 Respectively. Make sure to back up the existing database before starting the upgrade process.
The following packages should be installed for your Operating System:
    vim
    unzip
    tar
(eg:~# apt-get install vim)
You require “root” user access. Run all commands in the installation instructions using root-level permission.

 

1.      9.8.1 UPGRADE JAVA 6 to JAVA 7

     9.8.1.1 Preconditions for Upgrading Java

  1. Access OpenClinica at the following URL:
    http://localhost:8080/OpenClinica
    The Login page should display.
  2. Verify there is a directory usr/local/oc/install
    If there is not one than Create the directory
    mkdir -p /usr/local/oc/`date +%b-%d-%Y`
    mkdir -p /usr/local/oc/install/`date +%b-%d-%Y`
  3. Verify the current version of the Java is Java 6 by this command
    /usr/local/java/jre/bin# file java

9.8.1.2 Upgrade Java6 to Java7

From one of the following websites, download the Java 7 SE Development Kit. Verify the operating system that is running in Linux. Use either 32 or 64 applicable your operating system.
In your Linux terminal, run
uname -a
The display reports the version:
    If i386 or i686 displays, it is a 32-bit operating system.
    If x86_64 displays, it is a 64-bit operating system.
From one of the following websites, download the Java 7 and copy it into the local folder /usr/local/oc/install/

  1. Java:http://www.oracle.com/technetwork/java/index.html
  2. OpenClinica: http://svn.akazaresearch.com/oc/software/OpenClinica-3.2/linux/ 

  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-x64.gz  
  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-i586.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. 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
  2. Install Java by running:
    chmod a+x jdk-7*
    ./jdk-7*
  3. When the files finish extracting, the system displays “Press Enter to continue …,” press Enter.
  4. Install Java in the operating system by running:
    mv jdk1* /usr/local/
    ln -s /usr/local/jdk1* /usr/local/java
    Java is now installed in the correct location.

9.8.1.3 Verify Java7 is installed

  1. Verify the current version of the Java is Java 7 by this command in root
    Goto: cd /usr/local/java/jre/bin
    Run:  ./java version
    (Eg: root@bagel:/usr/local/java/jre/bin# ./java version)
  2. Access OpenClinica at the following URL:
    http://localhost:8080/OpenClinica
    The Login page should display.

 

1.      9.8.2 UPGRADE Tomcat6 to Tomcat7

9.8.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 following command
    /etc/init.d/tomcat stop
  3. Uninstall Tomcat 6 from your system with all the configuration file:
    rm rf tomcat
    rm rf apache-tomcat-6.0.32

9.8.2.2 Install  Tomcat 7

The OpenClinica software uses the Apache Tomcat Java application server. From one of the following websites, download the Tomcat 7 and copy it into the local folder /usr/local/oc/install/

  1. Run following command in /usr/local/oc/install/ to install tomcat7.
    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 -zxvf apache-tomcat-7*
    mv apache-tomcat-7.0.52 /usr/local/
    ln -s /usr/local/apache-tomcat-7.0.52 /usr/local/tomcat
    /usr/sbin/adduser tomcat

    (Note: Enter UNIX password will show up, use tomcat as password, and also 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:
    cp /usr/local/oc/install/OpenClinica-3.2*/install-docs/linux/tomcat /etc/init.d/
    cd /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 filePath parameter to the right value
    chown -R tomcat /usr/local/tomcat/*
    chown -R tomcat /usr/local/apache-*

 
9.8.2.3 Deploy  OpenClinica Package

      Before deploying the Tomcat should be stopped.

  1. Stop tomcat 7 by following command
    /etc/init.d/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 the following commands.
    unzip OpenClinica 3.2*
    cd OpenClinica 3.2*/distribution
    unzip OpenClinica.war -d OpenClinica
    cp -rf OpenClinica* /usr/local/tomcat/webapps
    rm -f /usr/local/tomcat/webapps/OpenClinica.war
  4. OpenClinica is now deployed for use with the database.

                                                                                                                                                                                             9.8.2.4 Verify Tomcat 7 is Started and Application is Running

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