


Red Hat Enterprise Linux 7でサーバ構築するとウィルス対策やバックアップソフトなど商用アプリケーションをインストールする場合があります。
その場合、商用アプリケーションの対応バージョン、カーネルを考慮する必要があり、むやみにyum updateは避ける必要があります。
yum updateで除外する方法です。
How do I exclude kernel or other packages from getting updated in Red Hat Enterprise Linux while updating system via yum?
https://access.redhat.com/solutions/10185
※RHNアカウントでログインしないと全文が読めません。
- Kernelのアップデート除外
- リリースバージョンのアップデート除外
- 複数除外指定
- /etc/yum.confで指定
1 |
# yum update --exclude=kernel* |
1 |
# yum update --exclude=redhat-release* |
1 |
# yum update --exclude=kernel*,redhat-release* |
1 2 3 4 |
# vi /etc/yum.conf # cat /etc/yum.conf ..... exclude=kernel* redhat-release* |
複数指定はカンマかスペースで区切り、複数行は書けません。
RHEL 7.3で実行したところexclude=redhat-release* を指定しないと下記の更新が行われ7.3が7.5にアップグレードされてしまいます。
1 2 |
---> パッケージ redhat-release-server.x86_64 0:7.3-7.el7 を 更新 ---> パッケージ redhat-release-server.x86_64 0:7.5-8.el7 を アップデート |
またConflictエラーも発生しました。
1 2 3 4 5 |
--> Processing Conflict: initscripts-9.49.41-1.el7.x86_64 conflicts redhat-release < 7.5-0.11 --> Finished Dependency Resolution Error: initscripts conflicts with redhat-release-server-7.3-7.el7.x86_64 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest |
yum update fails with “initscripts conflicts with redhat-release-server-7.2-9.el7.x86_64” error.
https://access.redhat.com/solutions/3423391
上記は7.2の事例ですが、7.3でも同様のエラーが発生したので下記を追加しyum updateが成功、7.3のままになりました。
1 |
exclude=kernel* redhat-release* initscripts* |