CentOS 5.2 Yum Automatic Updates

Took a little hunting around to find this out (I haven’t been using yum very long), perhaps it will help someone in the future.

  1. Update everything: yum update
  2. Install yum-cron. This is an alternative to yum-updatesd, a daemon that looked like people were having problems with and were not recommending for servers. yum install yum-cron.
  3. yum-cron isn’t a daemon, its a way of getting some daily weekly cron scripts installed on the server so that yum updates once per day and cleans up once per week. When you do a chkconfig –list you’ll see that yum-cron is in the list and is off for all run-levels, not sure if that’s important or not since once its installed, cron and the cron scripts should work fine on reboot (as long as crond is on). I turned yum-cron on any way chkconfig yum-cron on.
  4. That’s it. Now yum should check for updates each night and install any thing its found.

2 thoughts on “CentOS 5.2 Yum Automatic Updates

  1. Thanks for this! I was looking since a while.

    Looks like it’s necessary to start & enable yum-cron because in the script located in cron.daily says:

    # Only run if this flag file is set (by /etc/rc.d/init.d/yum-cron)
    if [ ! -f /var/lock/subsys/yum-cron ]; then
    exit 0

    And this “flag” is set when /etc/init.d/yum.cron start is executed.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s