LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Automatic upgrade on CentOS? (https://www.linuxquestions.org/questions/linux-server-73/automatic-upgrade-on-centos-4175498017/)

circus78 03-13-2014 04:47 AM

Automatic upgrade on CentOS?
 
Hi,

I noticed that on one of my server

Quote:

# lsb_release -a
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.5 (Final)
Release: 6.5
Codename: Final
yum automatically installs upgrade. I would like to do this manually, instead.
I did not set any crontab or similar.
Where can I find the origin of this behavior?
Thankyou

rknichols 03-13-2014 11:02 AM

That would probably be the package yum-cron. You could simply uninstall it, or check `man yum-cron` for ways to control it. You can see the files involved by running "rpm -ql yum-cron".

John VV 03-13-2014 11:36 AM

This is for ScientificLinux instead
BUT
the same applies
if YOU !!! want to determine WHEN the "upgrade" is ran
( i do this )
make SURE that the repos are using 6.4
then upgrade to 6.5

the next in about 6 to 8 months it to 6.6

Code:

--- code--- 6.5/$basearch/os/

---------- this is for SL 6.5 ! you will need to edit YOUR files
baseurl=http://ftp.scientificlinux.org/linux/scientific/$releasever/$basearch/os/
                http://ftp1.scientificlinux.org/linux/scientific/$releasever/$basearch/os/
                http://ftp2.scientificlinux.org/linux/scientific/$releasever/$basearch/os/
                ftp://ftp.scientificlinux.org/linux/scientific/$releasever/$basearch/os/
#mirrorlist=http://ftp.scientificlinux.org/linux/scientific/mirrorlist/sl-base-6.txt
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-sl file:///etc/pki/rpm-gpg/RPM-GPG-KEY-sl6 file:///etc/pki/rpm-gpg/RPM-GPG-KEY-cern

use " $releasever " in the name or " 6.5 "

circus78 03-17-2014 05:52 AM

Hi,
I've no "yum-cron" package installed on this system:

Quote:

[root@server ~]# yum list installed |grep cron
cronie.x86_64 1.4.4-12.el6 @base
cronie-anacron.x86_64 1.4.4-12.el6 @base
crontabs.noarch 1.10-33.el6 @base

rknichols 03-17-2014 09:17 AM

It is unclear which of two scenarios is the basis of your complaint:
  1. I ran "yum update" and it unexpectedly upgraded my system to the latest point release.
  2. yum ran automatically and upgraded my system without any action by me.
For case (1), that is normal behavior for CentOS. If you believe that you want to stay locked at, for example, release 6.4, you can substitute that for "$releasever" in the .repo file, but be warned that release 6.4 receives no more updates after 6.5 becomes available.

For case (2), there must be something in /etc/cron.{hourly,daily,weekly,monthly} or /var/spool/cron that is doing the update.

circus78 03-27-2014 10:09 AM

Quote:

Originally Posted by rknichols (Post 5136071)
It is unclear which of two scenarios is the basis of your complaint:
  1. I ran "yum update" and it unexpectedly upgraded my system to the latest point release.
  2. yum ran automatically and upgraded my system without any action by me.
For case (1), that is normal behavior for CentOS. If you believe that you want to stay locked at, for example, release 6.4, you can substitute that for "$releasever" in the .repo file, but be warned that release 6.4 receives no more updates after 6.5 becomes available.

For case (2), there must be something in /etc/cron.{hourly,daily,weekly,monthly} or /var/spool/cron that is doing the update.

Hi, I found this cronjob:

# cat /etc/cron.daily/yum.cron
Quote:

#!/bin/sh

# Pull in sysconfig settings

. /etc/sysconfig/yum-check


if [ -f /var/lock/subsys/yum ]; then

if [ ${CHECKONLY} = "yes" ];then

/usr/bin/yum-check
fi
else
/usr/bin/yum -R 10 -e 0 -d 0 -y update yum
/usr/bin/yum -R 120 -e 0 -d 0 -y update
fi
but the content of /etc/sysconfig/yum-check is:

# cat /etc/sysconfig/yum-check
Quote:

# yes sets yum to check for updates and mail only if patches are available
# no does enable autoupdate if /var/lock/subsys/yum is available
CHECKONLY="yes"
# defaults to root, leave empty if .forward/alias in place for root
MAILTO="myemail@domain.net"
# Set to yes for debugging only! You'll get a mail for each run!
CHECKWRK="no"
# Seconds to randomize startup, if running from cron to balance load
RANGE="3600"
so, as CHECKONLY=yes, I can't explain why my system updates itself.
Thank you

szboardstretcher 03-27-2014 10:36 AM

Remember to shutdown yum-autoupdate or remove it completely.

Quote:

yum-autoupdate.noarch : Automatically update your machine daily via yum

rknichols 03-27-2014 10:43 AM

Where did the "yum-check" executable and config file come from? I can't find any package for CentOS that would provide those. Output from "ls -l /usr/bin/yum-check" and "rpm -qif /usr/bin/yum-check /etc/sysconfig/yum-check" would be useful.

szboardstretcher 03-27-2014 10:44 AM

Quote:

Originally Posted by rknichols (Post 5142291)
Where did the "yum-check" executable and config file come from? I can't find any package for CentOS that would provide those. Output from "ls -l /usr/bin/yum-check" and "rpm -qif /usr/bin/yum-check /etc/sysconfig/yum-check" would be useful.

Here you are:

http://wiki.centos.org/YumCheckOrInstallUpdates

rknichols 03-27-2014 11:26 AM

Quote:

Originally Posted by szboardstretcher (Post 5142293)

That looks safe enough.

Another possibility, if this machine was an upgrade from CentOS 5, would be a leftover yum-updatesd package (no longer provided in CentOS 6). File /etc/yum/yum-updatesd.conf would be the config file for that.


All times are GMT -5. The time now is 01:42 AM.