LoginSignup
1
2

More than 3 years have passed since last update.

EC2でマイナーバージョン指定でpsqlをアップデートする方法

Last updated at Posted at 2020-11-25

RPMをインストール

sudo rpm -ivh --nodeps https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm

AmazonLinux2 はredhat7をベースにしているようなので$releaseverを7に置換

sudo sed -i "s/\$releasever/7/g" "/etc/yum.repos.d/pgdg-redhat-all.repo"

元々入っていたバージョンを削除

sudo yum list installed | grep postgres
sudo yum remove postgresql-11.5-5.amzn2.0.1.x86_64

入れたいマイナーバージョンを指定してインストール

sudo yum install postgresql11-server-11.6 postgresql11-11.6

参考URL
https://qiita.com/libra_lt/items/f2d2d8ee389daf21d3fb
http://h2shiki.hateblo.jp/entry/2016/04/24/170721
http://zaas.hatenablog.com/entry/2020/01/19/122726

1
2
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
1
2