LoginSignup
0
0

PostgreSQL11環境でyumがエラーになった。

Last updated at Posted at 2024-01-05

はじめに

PostgreSQL11をインストールした環境でyumがエラーになったのでやったことを残しておきます。

環境

OracleLinux7.9
PostgreSQL11.x

PostgreSQL11.xは以下の手順でインストール済みです。
現在はバージョン11がサポート終了のため選択出来ません。
https://www.postgresql.org/download/linux/redhat/

やったこと

yum updateを実行するとエラーになるのでリポジトリのRPMを更新したらupdateが通るようになった。

[root@ol72 ~]# yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
...snip...
[root@ol72 ~]#

pgdg-redhat-all.repoに
baseurl=https://download.postgresql.org/pub/repos/yum/11/
からはじまる記載がなくなった。

[root@ol72 ~]# cd /etc/yum.repos.d/
[root@ol72 yum.repos.d]# cat pgdg-redhat-all.repo
...snip...
[pgdg15]
name=PostgreSQL 15 for RHEL / CentOS $releasever - $basearch
baseurl=https://download.postgresql.org/pub/repos/yum/15/redhat/rhel-$releasever-$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/PGDG-RPM-GPG-KEY-RHEL7
repo_gpgcheck = 1
...snip...
[root@ol72 yum.repos.d]#

リポジトリサーバ(download.postgresql.org)でもバージョン11のディレクトリ(/pub/repos/yum/11/)が削除されていた。

バージョン11はサポート終了なのでアップデートはしないが、再インストール用に適当なミラーサイトからRPMを保存しておく。

[root@ol72 ~]# rpm -qa | grep postgres | xargs -I {} wget https://mirror.pnl.gov/postgresql/pgrpm-11/redhat/rhel-7.9-x86_64/{}.rpm
...snip...
[root@ol72 ~]# sha256sum *rpm
754ae560a05db6c379674d0fc07eb8250d7c5998154122660a02fd380e918bf8  postgresql11-11.22-1PGDG.rhel7.x86_64.rpm
950f93b3cc95f1b032a647e1bdefe25090ea67ba04b21f958ff69dc6c068cb73  postgresql11-libs-11.22-1PGDG.rhel7.x86_64.rpm
d70b32f39af85ed2e422657b24c3e9341c9c449a2b77eb1aab1b4b6e27234e83  postgresql11-server-11.22-1PGDG.rhel7.x86_64.rpm
[root@ol72 ~]#

おわりに

古いバージョン使ってないでとっととバージョンアップしましょうということなんでしょうけど、バージョンアップできないシステムのテスト用の環境も必要なので余計な手間をかけずに過去のファイルにアクセスできるとうれしい。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0