Get the most out of your Centmin Mod LEMP stack
Become a Member

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

    747
    149
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +274
    Local Time:
    11:43 AM
    1.17.x Cluster
    10.3.x Cluster & Redis
    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 protected]
    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

    42,077
    9,497
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,613
    Local Time:
    11:43 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
  3. EckyBrazzz

    EckyBrazzz Active Member

    747
    149
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +274
    Local Time:
    11:43 AM
    1.17.x Cluster
    10.3.x Cluster & Redis
    /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 = [email protected]
    
    # 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 = [email protected]
    
    # 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

    42,077
    9,497
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,613
    Local Time:
    11:43 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    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

    747
    149
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +274
    Local Time:
    11:43 AM
    1.17.x Cluster
    10.3.x Cluster & Redis
    just fixing it when the blue alerts showed up:(
     
  6. EckyBrazzz

    EckyBrazzz Active Member

    747
    149
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +274
    Local Time:
    11:43 AM
    1.17.x Cluster
    10.3.x Cluster & Redis
    DONE! Noticed that in te QUOTE tag eveyting changed into a link
     
  7. EckyBrazzz

    EckyBrazzz Active Member

    747
    149
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +274
    Local Time:
    11:43 AM
    1.17.x Cluster
    10.3.x Cluster & Redis
  8. eva2000

    eva2000 Administrator Staff Member

    42,077
    9,497
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,613
    Local Time:
    11:43 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    nice
     
  9. EckyBrazzz

    EckyBrazzz Active Member

    747
    149
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +274
    Local Time:
    11:43 AM
    1.17.x Cluster
    10.3.x Cluster & Redis
    I was very suprised with the speed on Centos Bug report. Just some seconds to get the firs response.