Updating YUM packages automatically means you can get the latest updates and security patches of the software you are using on your server.

  1. Install yum-cron
    sudo yum -y install yum-cron
  2. Edit /etc/sysconfig/yum-cron  on CentOS 6 or /etc/yum/yum-cron.conf on CentOS 7
  3. Change all of these values to ‘yes’ instead of ‘no’:
    update_messages = yes
    download_updates = yes
    apply_updates = yes
  4. Start the yum-cron service and enable automatic start on server reboot
    systemctl start yum-cron
    systemctl enable yum-cron
Advertisements