错误!终端不支持 JavaScript ,请打开 JavaScript 功能!
设置 CentOS、Fedora、RedHat 自动更新软件包
目录
【原创】 🦑 【教程】

设置 CentOS、Fedora、RedHat 自动更新软件包


CentOS、RedHat 是常用的服务器操作系统,如何为服务器软件设置自动更新呢?

对于服务器来说,可以适当修改其中的update_cmd

1、首先安装自动更新的守护程序:

yum update -y && yum install yum-cron -y

2、随后对配置文件进行修改,将其中的几项配置修改为yes

[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

3、随后开启自动更新程序并设置开机启动:

systemctl start yum-cron
systemctl enable yum-cron

打开手机扫描阅读

29
2020-08-06 08:24:41
语音播报