2. Installing Ingres : Installing Ingres for Linux : Installing Ingres for Linux at the Command Line : How You Upgrade Using RPM
 
Share this page                  
How You Upgrade Using RPM
The process for safely upgrading any Ingres release using RPM is as follows.
To upgrade Ingres RPMs
1. Make sure the Ingres instance you want to upgrade is completely shut down and that you have taken a backup, as described in the Upgrade Guide.
Note:  Files that you have customized will be lost during the upgrade. Copy your customized files to a safe place. For more information, see the Upgrade Guide.
2. Issue the following command to see the list of Ingres RPM packages installed for the instance to be upgraded:
rpm -q --whatrequires core_pkg_name
where core_pkg_name is the core package name for the release.
Note:  If you are upgrading an instance that was installed using RPMs that were renamed to embed an instance ID, then use “core_pkg_name-XX” instead of the core package name.
Note:  All packages must be upgraded at once. Any attempt to perform an upgrade on a single or smaller group of packages will fail.
3. Log in as root and CD to the directory containing the RPM to be used to perform the upgrade. Make sure variable II_CONFIG is not set.
4. Run rpm -ivh to install the new RPM packages over the existing instance.
If the instance was originally installed using --prefix to change II_SYSTEM from the default, then this parameter must also be used for the upgrade.
For default instance location:
rpm -ivh --replacefiles --replacepkgs \
complete list of RPM files to be installed
For any other instance location:
rpm -ivh --replacefiles --replacepkgs --prefix <II_SYSTEM> \
complete list of RPM files to be installed
5. Remove the RPM package information for the old instance, as follows:
a. Find the correct packages:
rpm -q --whatrequires old_core_pkg_name-x.y.z
b. If the list returned is satisfactory, remove the packages:
rpm -q --whatrequires old_core_pkg_name-x.y.z | xargs rpm -e --justdb
c. Remove the RPM package information for the old core package. Include the version and the package name, for example:
rpm -e --justdb core_pkg_name-x.y.z
where x.y.z is the version number (for example 9.0.4).
6. Run the service script to configure and start the instance:
/sbin/service ingresXX start
where XX is the instance ID.
Note:   
If you used rpm -Uvh with --prefix to upgrade an instance, binary and other installed files (for example, iimerge) may be removed. Should this occur, simply re-run the same command using the additional flags ‑‑replacefiles and --replacepkgs, and all the missing files will be replaced. Database or configuration files will not be affected.
For the special case where you are upgrading from a non-NPTL build to a NPTL build with the same version number, you must upgrade using the following command:
rpm -ivh --replacefiles --replacepkgs new-package-list
Upgrade an ingbuild Installation Using RPM
To use the RPM command to upgrade an instance that was installed using the ingbuild program, follow these steps:
1. Create a file /tmp/upg.rsp and add the following lines:
II_HOSTNAME=hostname
II_INSTALLATION=XX
where hostname is the value returned by running "hostname" and XX is the value returned by "ingprenv II_INSTALLATION" for the instance to be upgraded.
2. Set the variable II_RESPONSE_FILE to point to the newly created file:
export II_RESPONSE_FILE=/tmp/upg.rsp
3. Install Ingres using the RPM command:
rpm -Uvh --prefix=$II_SYSTEM /path/to/rpms/*.rpm
4. Run the setup:
/etc/init.d/ingresXX configure
where XX is the instance ID.