Thank you for visiting the Rackspace Community
The The Community is live! Post new content or topics so our teams can assist.

Please contact your support team if you have a question or need assistance for any Rackspace products, services, or articles.

Configuring Automatic Package Updates on RHEL/CentOS

When you spin up a new Cloud Server, it will not automatically retrieve and install package updates.

To manually update all of the packages on the server, run the following:

# yum update

To update all of the packages on the server automatically at a certain time interval, you can use one of these methods:

1.  yum-updatesd

yum-updatesd is a daemon which can provide notification of pending package updates and install them automatically per configuration in /etc/yum/yum-updatesd.conf.  Additional configuration information is read from /etc/yum.conf.  In /etc/yum/yum-updatesd.conf, run_interval will control the number of seconds between successive checks for available updates and do_update will control whether or not the updates are automatically applied.  See the man page for yum-updatesd.conf for other options.

To install yum-updatesd:

# yum install yum-updatesd

Configure the daemon in /etc/yum/yum-updatesd.conf with your text editor of choice.  For example:

# vi /etc/yum/yum-updatesd.conf

Start yum-updatesd:

# service yum-updatesd start

Configure yum-updatesd to start when the server boots:

# chkconfig yum-updatesd on

2.  Create a small shell script and run it as a cron job. 

Use your text editor of choice to create a script:


# vi /etc/cron.daily/


# vi /etc/cron.weekly/

Add the following content to the script [-d sets the debugging level and -e sets the error level]:


/usr/bin/yum -y -d 0 -e 0 update yum

/usr/bin/yum -y -d 0 -e 0 update

Make the script executable:


# chmod +x /etc/cron.daily/


# chmod +x /etc/cron.weekly/

The script will now run at the times specified for /etc/cron.daily/ and /etc/cron.weekly/ configured in /etc/crontab.