d13d5ae1c3af3c63d7aae4a741923277.png

客户指定机器的系统要centos 7.6,易秋网络老易这边提供的实际也是centos 7.6,但是等客户安装完毕宝塔后,系统显示是centos 7.7,但是客户因为某些原因,就是要centos 7.6,易秋网络老易猜测是安装宝塔的过程中,centos 7.6自动更新到centos 7.7了。

[root@1403-sxx yum]# cat /etc/redhat-release

CentOS Linux release 7.6.1810 (Core)

那如何禁用centos 7的yum自动更新系统呢,百度了一下,还是能解决这个centos7自动更新系统的问题的。

cd /etc/yum

yum install yum-cron -y

[root@1403-s67 yum]# ls

fssnap.d pluginconf.d protected.d vars version-groups.conf yum-cron.conf yum-cron-hourly.conf

编辑下文件yum-cron.conf,把2个地方的yes,改成no,

update_messages = no

download_updates = no

[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 = no [这个地方默认是yes,改成no]

# Whether updates should be downloaded when they are available.

download_updates = no [这个地方默认是yes,改成no]

然后宝塔安装完毕后,再看看,系统还是centos7.6,这次系统没有自动更新成centos 7.7

4a5ade3987f229560b18b8e40f550f1e.png

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐