Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»Linux Distributions»CentOS»How to Keep Systems Up to Date – CentOS / RHEL / Fedora

    How to Keep Systems Up to Date – CentOS / RHEL / Fedora

    By RahulFebruary 24, 20133 Mins Read

    Being a system administrator, we always need to keep our systems up to date with latest packages. Its difficult to go to server daily and check for available packages. For the same we can use yum-updatesd service to get email notifications to our mailbox or we can also configure this service to update any packages automatically when available.

    Advertisement

    Yum-updatesd can be configured with few easy steps given below. You may also need to install top yum repositories provided latest packages.

    Step 1: Install/Update yum-updatesd Package

    By default this package installed on system installation time. So should just update this package before configure it.

    # yum update yum-updatesd
    

    Step 2: Configure yum-updatesd

    Change configuration file as per your requirements. Edit file in your favorite editor, for example i use vim.

    # vim /etc/yum/yum-updatesd.conf
    
    [main]
    # how often to check for new updates (in seconds)
    run_interval = 3600
    # how often to allow checking on request (in seconds)
    updaterefresh = 600
    
    # how to send notifications (valid: dbus, email, syslog)
    emit_via = email
    
    # Put your mail address
    email_to = [email protected]
    
    # who send the notifications
    email_from = [email protected]
    
    # should we listen via dbus to give out update information/check for
    # new updates
    dbus_listener = yes
    
    # automatically install updates
    do_update = no
    # automatically download updates
    do_download = no
    # automatically download deps of updates
    do_download_deps = no
    

    Configuration Details:

      run_interval: Number of seconds to rechecks for available updates.
      updaterefresh: Minimum number of seconds between update information refreshes.
      emit_via: Ways to emit update notification. Valid values are ’email’, ‘dbus’ and ‘syslog’.
      do_update: ‘yes’ for auto update packages, ‘no’ for not to auto update ( preferred ‘no’ )
      do_download: ‘yes’ for auto download packages, ‘no’ for not to download updates ( preferred ‘no’ )
      do_download_deps: yes’ for auto download packages dependencies also, ‘no’ for not to download dependencies ( preferred ‘no’ )
      email_to: Email addresses to send update notification to.
      email_from: Email address for update notifications to be from.

    Step 3: Exclude Some Packages from Auto Update

    Few of packages we don’t need to auto update until more specific reason, for eg PHP and MySQL. To do it editpen /etc/yum.conf file.

    # vi /etc/yum.conf
    

    And add the following line under [main] section.

     exclude=php* kernel* mysql* httpd*
    

    Step 4: Restart yum-updatesd Service

    Use following command to restart yum-updatesd service and enable auto start on system boot.

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

    You will get email to your mailbox like below

    Hi,
    This is the automatic update system on tecadmin.net.
    
    There are 12 package updates available. Please run the system updater.
    
    Packages available for update:
    
        mutt
        initscripts
        gnutls
        gnupg
        talk
        nss_db
        at
        gd
        avahi
        gettext
        samba
        rsh
    
    Thank You,
    Your Computer
    

    Thanks for reading this post. I hope this post will help you for keep up to date your system.

    yum-updatesd
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    An Introduction to the “./configure” Command: Compiling Source Code in Linux

    Getting Started with Linux Command line: The Beginning

    Backing Up Your Linux System with Rsync: A Step-by-Step Guide

    View 2 Comments

    2 Comments

    1. Daryl St Jean on November 7, 2015 4:32 pm

      I ran into the same issue as Aaron when attempting to configure the updatesd.conf. Does any one have an answer or work around for this?

      Reply
    2. Aaron Moffatt on July 17, 2015 1:09 am

      Hi,

      I got stuck at this section:

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

      I don’t seem to have yum-updatesd in my /etc/init.d folder.

      I am using CentOS 6.6.

      Reply

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • 20 Basic Linux Commands for the Beginners (Recommended)
    • tail Command in Linux with Examples
    • What is a Orphan Process in Unix/Linux
    • How To Display Warning Message to Unauthorized SSH Access
    • How to Set a Custom SSH Login Banner and MOTD
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.