9 1:Upgrade Project.net-Linux
 Upgrading Project.net on a Linux System
This document guides a user through the process of upgrading a production installation of Project.net on a Linux platform from version 9.0.* or 9.1.*. This procedure will update both the application and its related database.
The upgrade consists of the following steps:
- Update the Oracle database
- Turn off the application and backup the database.
- Apply any database table updates.
- If you are upgrading from a version prior to 9.1.0 you will need to install Apache ActiveMQ.
- Update the Project.net application
- Deploy the new version of the application on the application server.
- Restart the application server.
- Set any site-specific configuration values.
 Unpack the Project.net installation package
The upgrade package includes everything you need in zip archive file except Apache ActiveMQ. The first step to upgrading Project.net is to unpack the software onto an accessible file location.
- If it does not exist, create a temporary directory to unpack the upgrade package, suggested /tmp/pnet, /var/tmp or /opt/pnet.
- Unzip the zip file from installation package into the directory chosen above. Once unpacked, you will have /opt/pnet/v9.1.1-OS, for example. These instructions will refer to this location as INSTALL_PACKAGE throughout these steps.
 Upgrade the Project.net Oracle database
Before installing any upgrade to the Project.net system it is important to back-up the Project.net database. This requires that you stop the application to prevent changes to the database during backup.
- Assumes the database on an Oracle database server.
- You will need to know the database server’s hostname and the system password for the Project.net database instance.
- A working copy of sqlplus. Normally, this is installed with the Oracle database, but if not, the Oracle instant client is sufficient.
- Stop the Apache Tomcat server (see starting and Stopping Project.net).
- Confirm Project.net is no longer running by attempting to open the Project.net login page; the browser will give a “Page not found” error.
- On your database server, follow the instructions to perform an off-line backup. You do not need to back up the document vault, unless you want to.
- To update the database execute the following commands:
- cd $INSTALL_PACKAGE/database/create-scripts (The following step must be run from this directory.)
- version_update.sh <pnet username>/<pnet password>@<database SID> <update version number> <pnet_user username> <pnet_user password> <database SID>
- A typical command would look like this:
version_update.sh pnet/<pnet password>@XE 9.2.0 pnet_user <pnet_user password> XE
- For Oracle XE, the database SID is XE.
- Please note that database SID should equal the database descriptor in your tnsnames.ora file of the Oracle client
- A typical command would look like this:
 Install Apache ActiveMQ (if upgrading from Project.net 9.0.*)
Complete this section only if you are upgrading from Project.net 9.0O; 9.1.0 and above currently have Apache ActiveMQ installed.
On the application server:
- The JAVA_HOME environment variable must be set to the directory where the Java runtime (JDK or JRE) is installed. If set, the following command should display the path to the Java runtime: echo $JAVA_HOME
- The java binary from JAVA_HOME should be available in the PATH variable, you can check if it's set by running echo $PATH and look for the path to the $JAVA_HOME/bin directory. In case a wrong version of java is in the path (such as for example gcj) please remove it.
- Download the latest stable Unix/Linux/Cygwin distribution of activemq from 'http://activemq.apache.org/download.html
- Extract the tarball in /opt or at a location of your choice
- To install it as a service daemon follow these steps:
- Go into the installation directory where you've unpacked the activemq tarball for example /opt/apache-activemq-5.3.0
- In case you are running a 32 bit Linux installation edit the following files:
- Change the ACTIVEMQ_HOME in <apache_activemq_install_dir>/bin/linux-x86-32/activemq to point to your <apache_activemq_install_dir>, for example ACTIVEMQ_HOME=/opt/apache-activemq-5.3.0
- Change both set.default.ACTIVEMQ_HOME and set.default.ACTIVEMQ_BASE in <apache_activemq_install_dir>/bin/linux-x86-32/wrapper.conf to point to your <apache_activemq_install_dir>, for example set.default.ACTIVEMQ_HOME=/opt/apache-activemq-5.3.0 and set.default.ACTIVEMQ_BASE=/opt/apache-activemq-5.3.0
- In case you are running a 64 bit Linux installation edit the following files:
- Change the ACTIVEMQ_HOME in <apache_activemq_install_dir>/bin/linux-x86-64/activemq to point to your <apache_activemq_install_dir>, for example ACTIVEMQ_HOME=/opt/apache-activemq-5.3.0
- Change both set.default.ACTIVEMQ_HOME and set.default.ACTIVEMQ_BASE in <apache_activemq_install_dir>/bin/linux-x86-64/wrapper.conf to point to your <apache_activemq_install_dir>, for example set.default.ACTIVEMQ_HOME=/opt/apache-activemq-5.3.0 and set.default_ACTIVEMQ_BASE=/opt/apache-activemq-5.3.0
- Create a soft-link for the activemq daemon to your daemon init script directory:
- If you are running on 32 bit Linux Installation: ln -s /<apache_activemq_install_dir>/bin/linux-x86-32/activemq /etc/init.d/activemq
- If you are running on 64 bit Linux Installation: ln -s /<apache_activemq_install_dir>/bin/linux-x86-64/activemq /etc/init.d/activemq
- Set the service to start automatically when the system boots up: chkconfig --add activemq
- Startup the activemq using service activemq start
- Check in the logs that activemq started successfully: tail /<apache_activemq_install_dir>/data/wrapper.log
- You should have a message "INFO TransportConnector - Connector vm://localhost Started"
For more information please visit the ActiveMQ website at http://activemq.apache.org
 Update the Project.net application
- You will need to locate the directory where Apache Tomcat is installed, referred to as CATALINA_HOME. Look for a directory starting with "apache" or "tomcat" in /opt, /usr/share or /var/lib.
- You will need to know whether Project.net is installed as the default (root) or non-root application on Tomcat.
On the application server:
- Navigate to the folder CATALINA_HOME/webapps and delete the files ROOT folder and ROOT.war file (or the appropriately-named folder and file).
- Copy pnet.war file from INSTALL_PACKAGE/app/ to the CATALINA_HOME/webapps/ folder, naming it either ROOT.war or the application's name.
- Start the Apache Tomcat server (see starting and Stopping Project.net).
 Apply site-specific configuration changes
When installing a new version of Project.net some of the configuration settings may reset to their default values and you may need to re-configure them; these values are set through the Application Administration interface. Follow Configure Project.net System Settings to make sure the values are correct for your installation.
Once verified, logout as the administrator and your new version of Project.net is ready to go.