#navi(../)
* CentOSでカーネルアップデートを抑止する [#n1906ca4]
yumコマンドでカーネルがアップデートされないようにする設定方法を以下に記します。
#contents
#htmlinsertpcsp(linux_ads_top.html,linux-sp.html)
* yum.confの設定 [#qf71e933]
yum.confにカーネルアップデートをしないように設定することができます。~
以下、CentOS7の/etc/yum.confになります。~
先頭から20行を表示させています。
$ cat /etc/yum.conf | head -20
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=5
bugtracker_url=http://bugs.centos.org/set_project.php?project_id=23&ref=http://bugs.centos.org/bug_report_page.php?category=yum
distroverpkg=centos-release
# This is the default, if you make this bigger yum won't see if the metadata
# is newer on the remote and so you'll "gain" the bandwidth of not having to
# download the new metadata and "pay" for it by yum not having correct
# information.
# It is esp. important, to have correct metadata, for distributions like
# Fedora which don't keep old packages around. If you don't like this checking
mainセクションに ''exclude=kernel*'' を追記すればyumコマンドでカーネルアップデートされないようにできます。~
記述は以下のようになります。~
mainセクションの一番下に追記してあります。
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=5
bugtracker_url=http://bugs.centos.org/set_project.php?project_id=23&ref=http://bugs.centos.org/bug_report_page.php?category=yum
distroverpkg=centos-release
exclude=kernel*
<snip>
* /etc/sysconfig/kernelについて [#e979695a]
/etc/sysconfig/kernelは、新しいカーネルにアップデートしても起動設定は前のままにする設定を行うことができます。~
yesがデフォルトの設定です。
UPDATEDEFAULT=yes
yesをnoにすれば、カーネルアップデートをしても前の設定のままになります。
UPDATEDEFAULT=no
以上、カーネルアップデートを抑止する設定方法でした。
#htmlinsertpcsp(linux_ads_btm.html,linux-sp.html)