Scheduling automatic updates in yum is very easy. You can safely enable the auto updates in yum. It can be done simply by editing the yum updates configuration file. Please go through the following steps:
# nano /etc/yum/yum-updatesd.conf
Find the below line in the configuration file:
do_update = no
Now, change it to
do_update = yes
Now, save the file and exit. The changes will take effect only after you restart “yum-updatesd”. Enter the following command:
# /etc/init.d/yum-updatesd restart
Once you enter the above command, it will restart and the YUM automatic updates will be successfully enabled on your dedicated server. You should make sure that your server have all the lastest security updates and patches. The best way to get informed about the latest updates and patches is to subscribe the security updates mailing list of your distribution.
for CentOS 6, please refer below link: