Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Tuesday, 21 June 2016

How To Enabling YUM Automatic Updates & Send Mail in CentOS/RHEL 6x

Enabling YUM Automatic Updates & Send Mail in CentOS/RHEL 6x

Step: 1. Install Yum-Cron Package :

# yum -y install yum-cron

Step: 2. Configure Yum-Cron :

Note: By default, this software is configured to download all the updates & apply them immediately after downloading, but we can change these behaviors in its configuration file. In my opinion the default is good for what i want to achieve, download & install all the updates, if you just want a mail that tell you which packages are available set the parameter CHECK_ONLY to yes, this will NOT download the updates but will just check if there are updates & will send an email to the root account if there is something that can be updated.

# vi /etc/sysconfig/yum-cron

# Don't install, just check (valid: yes|no)
CHECK_ONLY=yes

# Don't install, just check & download (valid: yes|no)
DOWNLOAD_ONLY=no

# by default MAILTO is unset, so crond mails the output by itself.
MAILTO=koushik@domain.com

-- Save & Quit (:wq)

Step: 3. Block Packages from being Automatically Updated :

Note: If you want to exclude some packages from being updated.

# vi /etc/yum.conf

YUM_PARAMETER="-x kernel* -x php* -x httpd*"

-- Save & Quit (:wq)

Step: 4. Start Yum-Cron Service :

# service yum-cron start
# chkconfig yum-cron on

Thanks For Visiting on My Blog, For More Tutorials Keep Visiting My Blog

0 comments:

Post a Comment

Copyright © 2016 Kousik Chatterjee's Blog