3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Amazon Linux 2でpostgres 15.x clientをインストール

Last updated at Posted at 2024-04-11

EC2にPostgreSQL15のクライアントをインストールする方法を記録する。

下記のファイルを作成。

/etc/yum.repos.d/pgdg.repo
[pgdg15]
name=PostgreSQL 15 for Redhat Linux – x86_64
baseurl=https://download.postgresql.org/pub/repos/yum/15/redhat/rhel-7.10-x86_64
enabled=1
gpgcheck=0

その後、下記のコマンドを実行する。

sudo yum makecache
sudo yum repolist (ensure that pgdg15 shows as a repository)
sudo yum install libzstd
sudo yum –disablerepo=”*” –enablerepo=”pgdg15″ install postgresql15-15.3-1PGDG.rhel7 (To get postgres 15.3)

クライアントをインストールする。

sudo yum install postgresql15-server

接続

psql -h <hostname> -U <username> -d <database> -p <port>
3
1
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
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?