Auto update CentOS server with yum
Posted on January 31, 2010 with No Comments
Create file yum_update.sh
vi /etc/cron.daily/yum_update.sh
With following content
#!/bin/bash /usr/bin/yum -y -R 120 -d 0 -e 0 update yum /usr/bin/yum -y -R 10 -e 0 -d 0 update
-e 0 -d 0 are to only show critical errors.
-R adds random delay between command execution.
Make it executable
chmod 755 /etc/cron.daily/yum_update.sh
Tags: auto update, auto yum update, cron, cronjob, yum, yum update
Category: Linux