Centos アップデートを無効にする

Centos アップデートを無効にする

私はこれに比較的新しいものです。私たちのシステムはちょうど更新されました。 (私たちはこれを尋ねません)

CentOS Server 7.5.1804で自動更新を無効にする必要があります。

関連質問を見ましたここしかし、私のシステムはそうではないので、packagekitこのソリューションは少なくとも私にとってはうまくいきません。

私が探しているものは何ですか?

質問1:

アップデートを無効にする1つの方法は次のとおりです。セキュリティアップデートカーネルで利用可能

# /etc/yum/yum-cron.conf
#  What kind of update to use:
# default                            = yum upgrade
# security                           = yum --security upgrade
# security-severity:Critical         = yum --sec-severity=Critical upgrade
# minimal                            = yum --bugfix update-minimal
# minimal-security                   = yum --security update-minimal
# minimal-security-severity:Critical =  --sec-severity=Critical update-minimal
update_cmd = default

# Whether a message should be emitted when updates are available,
# were downloaded, or applied.
update_messages = yes

# Whether updates should be downloaded when they are available.
download_updates = yes

# Whether updates should be applied when they are available.  Note
# that download_updates must also be yes for the update to be applied.
apply_updates = yes

次のいずれかを変更する必要がありますか?

  • download_updates(はい=>いいえ)
  • apply_updates (yes => no)
  • update_cmd (デフォルト => 安全)

この目標を達成するには?

質問2: 特定のパッケージの更新を無効にする必要がある場合は、次の手順を実行する必要がありますか?

> vi /etc/yum.conf 
> ## Added this inside yum.conf
> exclude=postgresql

それでは、与えられたパッケージ名が正しいことをどのように確認できますか? (本質的に無効にしたいですpostgresql。)つまりpostgresqlpostgresql-server

ベストアンサー1

質問1:に追加してください。includepkgs=kernel*これにより、yum.confカーネルパッケージ以外のパッケージは更新されません。また、カーネルで始まらないパッケージのインストールも防ぎますので、この行を追加する前に必要なものがすべてインストールされていることを確認してください。あるいは、この行を個々のストレージファイルに追加することもできますrepo

質問2:exclude=postgresql*と同じ方法で追加しますincludepkg。これにより、名前で始まるパッケージがインストールまたはpostgresql更新されなくなります。

おすすめ記事