0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

CentOS6.7にPostgreSQL9.5をインストールする

Posted at

はじめに

PostgreSQL Serverの古いバージョンの検証が必要になったので
インストール手順をメモする

OS:centOS6.7
DB:PostgreSQL9.5

以下の3つをインストール
・postgresql95-libs クライアントやI/Fに必要なライブラリ
・postgresql95 PostgreSQLに接続、操作等を行うクライアント
・postgresql95-server サーバ機能(作成、起動、停止等)

手順

1.必要ファイルをダウンロードする

wget https://yum.postgresql.org/9.5/redhat/rhel-6-x86_64/postgresql95-libs-9.5.25-1PGDG.rhel6.x86_64.rpm
wget https://yum.postgresql.org/9.5/redhat/rhel-6-x86_64/postgresql95-9.5.25-1PGDG.rhel6.x86_64.rpm
wget https://yum.postgresql.org/9.5/redhat/rhel-6-x86_64/postgresql95-server-9.5.25-1PGDG.rhel6.x86_64.rpm

2.インストールする

rpm -Uvh postgresql95-libs-9.5.25-1PGDG.rhel6.x86_64.rpm
rpm -Uvh postgresql95-9.5.25-1PGDG.rhel6.x86_64.rpm
rpm -Uvh postgresql95-server-9.5.25-1PGDG.rhel6.x86_64.rpm

3.初期化

service postgresql-9.5 initdb

4.DB起動

service postgresql-9.5 start

5.ユーザスイッチ

su - postgres

6.接続

psql

7.切断

\q

参考サイト

・公式のダウンロード先
https://yum.postgresql.org/9.5/redhat/rhel-6-x86_64/repoview/

・インストールする手順の参考
https://www.kakiro-web.com/linux/centos6-postgresql-install.html

履歴

2021/7/26 作成

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?