Search 72 posts

CentOS nightly auto updates using yum-cron

It seems like new security vulnerabilities comes out at least once per month now a days. Keeping your systems up to date is the easiest way to keep these…

Karl NyenGuidesLinux2 min readFrom the archive
Photographed terminal showing a system process monitor
On this page

CentOS logo

It seems like new security vulnerabilities comes out at least once per month now a days. Keeping your systems up to date is the easiest way to keep these threats at bay as well as overall system stability. You can do nightly YUM updates automatically with email notifications via a package called yum-cron. This is a simple and easy solution to keeping servers up to date without using a centralized patching solution (such as Spacewalk).

Step 1 - Install the yum-cron package and setup email notifications:

yum -y install yum-cron
chkconfig yum-cron on

Then edit /etc/sysconfig/yum-cron (CentOS 6) to set MAILTO= email address or /etc/yum/yum-cron.conf (CentOS 7) to set email_to= for email notifications. If you don’t need email notifications you can skip this part.

For CentOS 6:

MAILTO=youremail@domain.com

For CentOS 7:

email_to=youremail@domain.com

Step 2 - Start the yum-cron service…

service yum-cron start

Step 3 - Verifying yum-cron is working

Check that the service is running.

service yum-cron status

You can check your cron log at /var/log/cron to see if it ran using the following command.

cat /var/log/cron | grep yum.cron

You can also check the yum.log when it does notify of updates by email.

cat /var/log/yum.log

Karl Nyen

Writing about virtualization, home lab, cloud, storage and gaming on vSkilled, started in 2014.

Cover photo: Lukas on Unsplash

Keep exploring

Dark workstation with a laptop and a monitor displaying code

Linux

Installing open-vm-tools on CentOS

Just a quick post here today. This is in regards to installing open-vm-tools on CentOS. There's no need to download and install separate epel-release files…

Laptop screen with a code editor in blue light

Guides

Change SSH Port in CentOS - Linux

This is just a quick guide on how to change the SSH port in CentOS. While there are many ways to make sure your server is as secure as possible there are some…

Two machine cards, a mini PC server and a workstation, listing the Claude Code, Codex, Antigravity and Muse Code agents linked through AGENTS.md

AI

Running AI Coding Agents Across Several Machines

How I run Claude Code, Codex, Antigravity and Muse Code across a mini PC server and a workstation: one rulebook, a router for delegated work, hard safety gates and real numbers.