客户指定机器的系统要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