The yum command is used to install and update software under Centos, RedHat and Fedora. In this topic, i will use yum command to update Centos and configure yum to update automatically with Crontab.
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
Related Posts:
- Using yum command on CentOS / RedHat
- How To Use ClamAV & Cron Jobs To Run Daily And Hourly Virus Scans
- How To Extract RAR Files Under Linux
- How To Install Ksplice on CentOS / RedHat
- How To Update Linux Kernel With Ksplice Uptrack
- Install RPM File On CentOS / RedHat
- How to install IPTables on RedHat / Centos Linux