This article discusses how to lock a specific package version using yum.
- DSE and agent package installations on RHEL-based systems using Yum
When installing a specific version of DSE or Agent packages, yum automatically installs or upgrades to a later version than specified.
For example you might run the following command:
sudo yum install datastax-agent-5.2.5 --exclude dse-full
but the Agent package version 6.7 will be installed rather than version 5.2.5
As per RedHat Technote 98873 users can restrict yum to install or upgrade a package to a fixed specific version using the versionlock plugin of yum.
To do this:
Install the package named
yum-versionlockin RHEL 5).
# yum install yum-plugin-versionlock
/etc/yum/pluginconf.d/versionlock.listwill be created on the system.
To install or lock the version of the DSE/Agent package, add that package name to the
/etc/yum/pluginconf.d/versionlock.listfile. As per previous example:
# yum versionlock datastax-agent-5.2.5
(Alternatively, you can edit the filelist,
- The above configuration will not allow to upgrade the Agent package to a version later than what the version that was installed at the time the locking was performed.
- Yum will attempt to update all packages, while excluding the packages listed in the versionlock file.
- Upgrading to earlier versions of DSE with YUM installs latest version
- Manually deploying DataStax Agents from RPM
To display the list, use:
# yum versionlock list
To discard the list, use:
# yum versionlock clear