Control Web Panel
WebPanel => Updates => Topic started by: urantian on February 18, 2024, 01:59:07 AM
-
Is there a way to configure CWP Pro to automatically perform YUM updates, instead of starting them manually?
I found a way to configure a YUM cron to automatically install updates, but I don't know if this would have a conflict with CWP. The link is below.
https://www.howtoforge.com/tutorial/how-to-setup-automatic-security-updates-on-centos-7/
Michael
-
After manually doing updates for about a year, I went ahead and enabled auto updates with yum via cron. So for over a year now, I haven't been bothered with it and haven't been bitten by a bad update. (Major updates like MariaDB need to be manually done.) Occasionally you will get a "ghost" notice of updates being available, but generally this should take care of it for you:
As root, create this script:
/etc/cron.daily/yum
#!/bin/sh
# yummy updater
/usr/bin/yum -y update --security
-
Thank you for your reply! Did you install "yum-cron", or are you using just YUM? It seems like the latter, where you are simply adding the YUM update to the daily jobs.
Michael
-
Yes, the latter -- just adding to the daily jobs. Also, note that permissions on the script need to have the execute bit set. Some of the pre-baked scripts have 700, some have 755 permissions.
-
Thank you for the clarification.
Michael
-
@overseer, Thanks You for the little updater script.
I changed it a little for AL 8.
We also use a 3rd party Kernel, which is updated manually for obvious reasons.
What are your thoughts?
--
As root, create this script:
nano /etc/cron.daily/dnf
(Code:)
#!/bin/sh
# Dandified YUM (DNF) Updater
/usr/bin/dnf update --security --exclude=kernel* -y
--
chmod 755 /etc/cron.daily/dnf
ls -l /etc/cron.daily/
-
Seems good and tuned to your needs. When I get to AlmaLand next month I'll be doing:
#!/bin/sh
# Daily DNF Updater
/usr/bin/dnf update --security -y
(Although I did just write the code in my mind for conditionals, testing whether it was for YUM or DNF and branching accordingly -- a Rube Goldberg curse!)
-
For some reason that cron wasn't working. :/
Found dnf-automatic, and have that running on 1 server.
Create a KB article for AlmaLinux 8 and CentOS 7.