Upgrading to rsyslog7 without removing cron and dependency package ?
Environment
- Red Hat Enterprise Linux 6
- rsyslog7
- rsyslog5
Issue
- Upgrading to rsyslog7 without removing cron and dependant packages
Resolution
- NOTE: We strongly recommend you take a backup of your cron and rsyslog configuration files prior to attempting either of the following.
Preferred Method - yum shell
List the currently installed rsyslog package and sub-packages
yum list --disablerepo=* 'rsyslog*'
Create a file, yumctrl, with an install line that includes the rsyslog7 versions of each of the rsyslog packages listed above. The file might then look like
install rsyslog7 rsyslog7-gnutls
remove rsyslog rsyslog-gnutls
run
Then execute yum using the file as follows
yum shell yumctrl
On successful completion ensure the service is available and started.
chkconfig --add rsyslog
service rsyslog start
Alternate Method - rpm nodeps
Use "nodeps" option for removing rsyslog package and then install rsyslog7.
This method relies on temporarily creating an incomplete rpm dependency in the local database. If at all possible the machine should be idle (not running anything other than core daemons) for the duration of the procedure.
Firstly note which, if any, of the extra rsyslog packages are present, specifically rsyslog-gnutls, rsyslog-pgsql and rsyslog-relp.
# rpm -qa 'rsyslog*'
rsyslog-gnutls-5.8.10-10.el6_6.x86_64
rsyslog-pgsql-5.8.10-10.el6_6.x86_64
rsyslog-5.8.10-10.el6_6.x86_64
rsyslog-relp-5.8.10-10.el6_6.x86_64
Then use rpm to remove the v5 packages. And then install the rsyslog7 equivalents.
rpm -e --nodeps ` rpm -qa 'rsyslog*' `
yum install rsyslog7 rsyslog7-gnutls rsyslog7-pgsql rsyslog7-relp
and start the service
service rsyslog start
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.