Skip to content

Instantly share code, notes, and snippets.

@unakatsuo
Last active April 21, 2017 00:32
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save unakatsuo/8143855 to your computer and use it in GitHub Desktop.
Save unakatsuo/8143855 to your computer and use it in GitHub Desktop.
yum updateで古いマイナーリリースへ固定する

RHEL系で新しいマイナーリリースができた時yum updateしてしまうと、システムが大きく更新される。本番環境などではこれを固定したいことがあるので、その方法。

yum.repoファイルへ現れる、$releasever 変数を固定する。

例: CentOS6.4で以降のリリースがある場合でも6.4のまま固定化する。

  1. --releaseverオプションを指定する。
$ yum --releasever=6.4 update
  1. /etc/yum/varsへ変数ファイルを追加。

    http://docs.fedoraproject.org/ja-JP/Fedora/16/html/System_Administrators_Guide/sec-Using_Yum_Variables.html

$ echo 6.4 > /etc/yum/vars/releasever
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment