简体   繁体   中英

Google cloud compute engine - disable automatic updates (centos)

I wonder if there is a way to disable automatic updates of our Linux machines on Google Cloud (yum update)

As far as I know during maintenance window our servers get new packages of software installed. (I checked yum.log). Since our installed software must be specific version (not latest) we don't want Google to run updates for us because it usually breaks all kind of dependencies...

I have searched on Google but didn't find any info about that.

Thanks.

The centOS 7 image used in Compute Engine includes the yum-cron installed and enabled by default . You can verify it by either using one of the following commands:

sudo yum list installed yum-cron
sudo systemctl status yum-cron.service

The yum-cron will periodically check for updates and apply them if there are updates available.

Solution

If you have yum-cron running on your instance, you can disable auto-updates by accessing the configuration file /etc/yum/yum-cron.conf. Then change the following variables to 'no':

update_messages = no
download_updates = no
apply_updates = no

This will prevent the system from updating automatically.

As an alternative, you can opt for uninstalling the package on your system using the following command.

sudo yum remove yum-cron

This part is missing in the official documentation so It will be added soon.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM