Discover Centmin Mod today
Register Now

CentOS 7.x Yum auto upgrade error in XML

Discussion in 'CentOS, Redhat & Oracle Linux News' started by EckyBrazzz, May 30, 2019.

  1. EckyBrazzz

    EckyBrazzz Active Member

    916
    189
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +362
    Local Time:
    7:30 PM
    Latest
    Latest
    I like to keep my system upto date so installed Yum Autoupdate with a cron
    I guess that I missed something in the way that Yum updates but now I am receiving errors in my e-mails


    The install i did following a guide on the forum, but post it again as a reference from that I have in my notepad++ logbook.
    Code (Text):
    <----- START YUM Auto Update
    yum -y install yum-cron
    EMAIL=your@email.com
    sed -i "s|^email_to = root|email_to = ${EMAIL}|" /etc/yum/yum-cron.conf
    sed -i 's|^update_messages = no|update_messages = yes|' /etc/yum/yum-cron.conf
    sed -i 's|^download_updates = no|download_updates = yes|' /etc/yum/yum-cron.conf
    sed -i 's|^apply_updates = no|apply_updates = yes|' /etc/yum/yum-cron.conf
    sed -i 's|^emit_via = stdio|emit_via = email|' /etc/yum/yum-cron.conf
    sed -i "s|^email_to = root|email_to = ${EMAIL}|" /etc/yum/yum-cron-hourly.conf
    sed -i 's|^update_cmd = default|update_cmd = security|' /etc/yum/yum-cron-hourly.conf
    sed -i 's|^update_messages = no|update_messages = yes|' /etc/yum/yum-cron-hourly.conf
    sed -i 's|^download_updates = no|download_updates = yes|' /etc/yum/yum-cron-hourly.conf
    sed -i 's|^apply_updates = no|apply_updates = yes|' /etc/yum/yum-cron-hourly.conf
    sed -i 's|^emit_via = stdio|emit_via = email|' /etc/yum/yum-cron-hourly.conf   
    egrep '^email_to|^update_messages|^download_updates|^apply_updates|^emit_via' /etc/yum/yum-cron.conf
    <----- END YUM Auto Update
    
     
  2. eva2000

    eva2000 Administrator Staff Member

    54,647
    12,230
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,799
    Local Time:
    8:30 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  3. EckyBrazzz

    EckyBrazzz Active Member

    916
    189
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +362
    Local Time:
    7:30 PM
    Latest
    Latest
    /etc/yum/yum-cron.conf
    Code (Text):
    [commands]
    #  What kind of update to use:
    # default                            = yum upgrade
    # security                           = yum --security upgrade
    # security-severity:Critical         = yum --sec-severity=Critical upgrade
    # minimal                            = yum --bugfix update-minimal
    # minimal-security                   = yum --security update-minimal
    # minimal-security-severity:Critical =  --sec-severity=Critical update-minimal
    update_cmd = default
    
    # Whether a message should be emitted when updates are available,
    # were downloaded, or applied.
    update_messages = yes
    
    # Whether updates should be downloaded when they are available.
    download_updates = yes
    
    # Whether updates should be applied when they are available.  Note
    # that download_updates must also be yes for the update to be applied.
    apply_updates = yes
    
    # Maximum amout of time to randomly sleep, in minutes.  The program
    # will sleep for a random amount of time between 0 and random_sleep
    # minutes before running.  This is useful for e.g. staggering the
    # times that multiple systems will access update servers.  If
    # random_sleep is 0 or negative, the program will run immediately.
    # 6*60 = 360
    random_sleep = 360
    
    
    [emitters]
    # Name to use for this system in messages that are emitted.  If
    # system_name is None, the hostname will be used.
    system_name = None
    
    # How to send messages.  Valid options are stdio and email.  If
    # emit_via includes stdio, messages will be sent to stdout; this is useful
    # to have cron send the messages.  If emit_via includes email, this
    # program will send email itself according to the configured options.
    # If emit_via is None or left blank, no messages will be sent.
    emit_via = email
    
    # The width, in characters, that messages that are emitted should be
    # formatted to.
    output_width = 80
    
    # The address to send email messages from.
    # NOTE: 'localhost' will be replaced with the value of system_name.
    email_from = root
    
    # List of addresses to send messages to.
    email_to = private@private.com
    
    # Name of the host to connect to to send email messages.
    email_host = localhost
    
    
    [groups]
    # NOTE: This only works when group_command != objects, which is now the default
    # List of groups to update
    group_list = None
    
    # The types of group packages to install
    group_package_types = mandatory, default
    
    [base]
    # This section overrides yum.conf
    
    # Use this to filter Yum core messages
    # -4: critical
    # -3: critical+errors
    # -2: critical+errors+warnings (default)
    debuglevel = -2
    
    # skip_broken = True
    mdpolicy = group:main
    
    # Uncomment to auto-import new gpg keys (dangerous)
    # assumeyes = True
    

    /etc/yum/yum-cron-hourly.conf
    Code (Text):
    [commands]
    #  What kind of update to use:
    # default                            = yum upgrade
    # security                           = yum --security upgrade
    # security-severity:Critical         = yum --sec-severity=Critical upgrade
    # minimal                            = yum --bugfix update-minimal
    # minimal-security                   = yum --security update-minimal
    # minimal-security-severity:Critical =  --sec-severity=Critical update-minimal
    update_cmd = security
    
    # Whether a message should emitted when updates are available.
    update_messages = yes
    
    # Whether updates should be downloaded when they are available. Note
    # that updates_messages must also be yes for updates to be downloaded.
    download_updates = yes
    
    # Whether updates should be applied when they are available.  Note
    # that both update_messages and download_updates must also be yes for
    # the update to be applied
    apply_updates = yes
    
    # Maximum amout of time to randomly sleep, in minutes.  The program
    # will sleep for a random amount of time between 0 and random_sleep
    # minutes before running.  This is useful for e.g. staggering the
    # times that multiple systems will access update servers.  If
    # random_sleep is 0 or negative, the program will run immediately.
    random_sleep = 15
    
    
    [emitters]
    # Name to use for this system in messages that are emitted.  If
    # system_name is None, the hostname will be used.
    system_name = None
    
    # How to send messages.  Valid options are stdio and email.  If
    # emit_via includes stdio, messages will be sent to stdout; this is useful
    # to have cron send the messages.  If emit_via includes email, this
    # program will send email itself according to the configured options.
    # If emit_via is None or left blank, no messages will be sent.
    emit_via = email
    
    # The width, in characters, that messages that are emitted should be
    # formatted to.
    output_width = 80
    
    
    [email]
    # The address to send email messages from.
    # NOTE: 'localhost' will be replaced with the value of system_name.
    email_from = root
    
    # List of addresses to send messages to.
    email_to = private@private.com
    
    # Name of the host to connect to to send email messages.
    email_host = localhost
    
    
    [groups]
    # List of groups to update
    group_list = None
    
    # The types of group packages to install
    group_package_types = mandatory, default
    
    [base]
    # This section overrides yum.conf
    
    # Use this to filter Yum core messages
    # -4: critical
    # -3: critical+errors
    # -2: critical+errors+warnings (default)
    debuglevel = -2
    
    # skip_broken = True
    mdpolicy = group:main
    
    # Uncomment to auto-import new gpg keys (dangerous)
    # assumeyes = True
    


    Executed and let's wait
    Code (Text):
    yum clean all
    yum repolist all
    
     
    Last edited: May 30, 2019
  4. eva2000

    eva2000 Administrator Staff Member

    54,647
    12,230
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,799
    Local Time:
    8:30 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    might want to re-do copy and paste into CODE tags so it doesn't parse the content as QUOTE tags do :)
     
  5. EckyBrazzz

    EckyBrazzz Active Member

    916
    189
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +362
    Local Time:
    7:30 PM
    Latest
    Latest
    just fixing it when the blue alerts showed up:(
     
  6. EckyBrazzz

    EckyBrazzz Active Member

    916
    189
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +362
    Local Time:
    7:30 PM
    Latest
    Latest
    DONE! Noticed that in te QUOTE tag eveyting changed into a link
     
  7. eva2000

    eva2000 Administrator Staff Member

    54,647
    12,230
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,799
    Local Time:
    8:30 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    nice
     
  8. EckyBrazzz

    EckyBrazzz Active Member

    916
    189
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +362
    Local Time:
    7:30 PM
    Latest
    Latest
    I was very suprised with the speed on Centos Bug report. Just some seconds to get the firs response.