Automatic cron updates with yum-cron on centos

Automatic cron updates with yum-cron on centos

Automatic cron updates with yum-cron on centos

Update: I made a post on installing and configuring yum-cron in centos

I have a virtual machine on my esxi box running centos 7. I dont log in all that much, as most of the operations that are run are automatic (eg polling my github repo and executing builds)

Manually logging in and running a yum update isnt that much of a hastle, but there is a way to automate it (there are a few ways, but this way is easy)

Install yum-cron and add the service to your system


yum install yum-cron
chkconfig yum-cron on

then you can edit its cron task and set an email address of you like:


vi /etc/yum/yum-cron.conf 

# paste this line in the top of the file
email_to=user@domain

then start the yum-cron service


service yum-cron start

#there is also a way to start this with systemd, but the above command is much easier to remember

References:
this helpful guide: https://community.centminmod.com/threads/automatic-nightly-yum-updates-with-yum-cron.1507/
yum-cron man page: http://man7.org/linux/man-pages/man8/yum-cron.8.html

(Visited 651 times, 1 visits today)
  • Phil

    The systemctl way is

    “`
    systemctl enable yum-cron
    systemctl start yum-cron
    “`

Tags for Automatic cron updates with yum-cron on centos

address command edit email file install linux machine updates user virtual