Upgrade an Installation from the RPM Package
When you upgrade an installation from the RPM package, the new version uses the default configuration, data, log, and resource directories. If the previous version used the default directories, the new version has access to the files created in the previous version.
If the previous version used customized values for the directory environment variables, you must make the same customizations in the new version so that the new version can access the same files.
To upgrade an installation from the RPM package, perform the following steps:
Step 1. Shut Down the Previous Version
Step 2. Back Up the Previous Version
Step 3. Install the New Version
Step 4. Update Environment Variables
Step 5. Update the Configuration Files
Step 6. Install Additional Libraries for the Core Installation
Step 1. Shut Down the Previous Version
Stop all pipelines and then shut down the previous version of Data Collector.
Step 2. Back Up the Previous Version
Before you install the new version, create a backup of the files in the data and resource directories in the previous version. You’ll also need to create a backup of the environment configuration file so that the file is not overwritten when you install the new version. That way, you can continue to run the previous version if needed.
- Data directory defined in the SDC_DATA environment variable. Default is
/var/lib/sdc
. - Resource directory defined in the SDC_RESOURCES environment variable. Default is
/var/lib/sdc-resources
. - File that defines environment variables, based on the operating system:
- CentOS 6, Oracle Linux 6, or Red Hat Enterprise Linux
6 - the
$SDC_DIST/libexec/sdcd-env.sh
file. - CentOS 7, Oracle Linux 7, or Red Hat Enterprise Linux
7 - the
/usr/lib/systemd/system/sdc.service
file.
- CentOS 6, Oracle Linux 6, or Red Hat Enterprise Linux
6 - the
For example, if you are upgrading version 3.0.0.0 on CentOS 6, Oracle Linux 6, or Red Hat Enterprise Linux
6, back up the Data Collector
data directory and name it as follows: /var/lib/sdc3000
. Create a
backup of the environment configuration file and name the backup file as follows:
sdcd-env-3000.sh
.
Step 3. Install the New Version
Install the new version of the RPM package. Installing the full Data Collector as a service requires root privileges.
Step 4. Update Environment Variables
Each RPM installation uses the same default values as the previous version for all of the environment variables. If the previous version used the default values, the new version is configured to use the same environment variables.
If the previous version used customized values for the environment variables, you must make the same customizations in the new version. The new version must use the same data, log, and resource directories as the previous version.
Step 5. Update the Configuration Files
A new Data Collector version can include new properties and configuration files required for Data Collector to start or function properly.
When you install the new RPM package, the configuration files are written to the same
default directory as the previous version, /etc/sdc
. The new
versions of the configuration files are renamed with the following extension:
.rpmnew
. For example, the new version of the Data Collector configuration file is renamed to sdc.properties.rpmnew
.
To update the configuration files, you must rename the previous and new versions of the files and then update the new files with any customized property values defined in the previous version.
$SDC_CONF
,
the new configuration files are written to a different directory than the previous
version, and so do not require the .rpmnew
file extension. In this
case, you do not rename the configuration files, but must update the new files with
any customized values defined in the previous version.Step 6. Install Additional Libraries for the Core Installation
If you installed the core RPM package, install the individual stage libraries that the upgraded pipelines require.
For instructions on installing additional stage libraries, see Installing for RPM.
Step 7. Uninstall Previous Libraries
Uninstall all stage libraries used by the previous Data Collector version.
- Run the following command to list all stage libraries used by the previous Data
Collector
version:
yum list installed | grep "datacollector" | grep "<version>"
For example, to list all stage libraries used by Data Collector version 3.0.0.0, run the following command:yum list installed | grep "datacollector" | grep "3.0.0.0"
- Run the following command to uninstall all stage libraries used by the previous
version:
yum remove <library package name>,<library package name>,...
Where
library package name
is the full name of the libraries that you want to uninstall. Separate each name with commas. Do not include spaces in the command.
Step 8. Start the New Version of Data Collector
- For CentOS 6, Oracle Linux 6, or Red Hat Enterprise Linux
6, use:
service sdc start
- For CentOS 7, Oracle Linux 7, or Red Hat Enterprise Linux
7, use:
systemctl start sdc