LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-13-2014, 04:47 AM   #1
circus78
Member
 
Registered: Dec 2011
Posts: 273

Rep: Reputation: Disabled
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
 
Old 03-13-2014, 11:02 AM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,770

Rep: Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210
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".
 
Old 03-13-2014, 11:36 AM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,622

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
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 "

Last edited by John VV; 03-13-2014 at 11:38 AM.
 
Old 03-17-2014, 05:52 AM   #4
circus78
Member
 
Registered: Dec 2011
Posts: 273

Original Poster
Rep: Reputation: Disabled
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
 
Old 03-17-2014, 09:17 AM   #5
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,770

Rep: Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210
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.
 
Old 03-27-2014, 10:09 AM   #6
circus78
Member
 
Registered: Dec 2011
Posts: 273

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rknichols View Post
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
 
Old 03-27-2014, 10:36 AM   #7
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Remember to shutdown yum-autoupdate or remove it completely.

Quote:
yum-autoupdate.noarch : Automatically update your machine daily via yum
 
Old 03-27-2014, 10:43 AM   #8
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,770

Rep: Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210
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.
 
Old 03-27-2014, 10:44 AM   #9
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Quote:
Originally Posted by rknichols View Post
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
 
Old 03-27-2014, 11:26 AM   #10
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,770

Rep: Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210
Quote:
Originally Posted by szboardstretcher View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatic upgrade? circus78 Debian 1 12-19-2013 12:07 PM
automatic login centos 6.3 spiky0011 Red Hat 1 01-20-2013 10:39 AM
Automatic Login on CentOS 5.5 Squirrelly Linux - Newbie 6 11-03-2010 04:17 PM
automatic login Centos 4.4 ihopeto Red Hat 1 11-16-2008 03:58 PM
automatic kernel upgrade treebug Debian 1 06-16-2005 12:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration