Schedule Automatic Updates in YUM

While some people may want to manually execute every single package update for their dedicated servers, you may be the type of person who expects your server to run well without any tweaking or manual configuration. CentOS and Red Hat Enterprise Linux give you that luxury. If you want, you can let the server update itself and never have to mess with package management.

Scheduling automatic yum updates is easy, so you might wonder why everyone does not do it. Some Linux system administrators make customizations to their servers. They may compile some packages from source and manually install them. They may add third-party repositories and install extra applications. In both scenarios, the changes to the server increase the likelihood of breakage occuring.

If you do not have any desire to make custom changes, however, you can usually safely enable auto updates. All you have to do is edit the yum updates configuration file:

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

Next, change the line:
do_update = no

to

do_update = yes

Finally, save and exit. You will need to restart yum-updatesd in order for the changes to come into effect:

# /etc/init.d/yum-updatesd restart

Now that you have successfully enabled automatic updates, your dedicated server should always have the latest security and software updates without any intervention on your part. You should still keep track of logs periodically to make sure the updates went smoothly. You can also subscribe your distribution’s security updates mailing list or news website to make sure you are still informed about potential threats.











Comments: