postgresql

yumでpostgresインストール

[root@web01 ~]# yum install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-redhat96-9.6-3.noarch.rpm
読み込んだプラグイン:product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
pgdg-redhat96-9.6-3.noarch.rpm | 4.7 kB 00:00
/var/tmp/yum-root-tir6RZ/pgdg-redhat96-9.6-3.noarch.rpm を調べています: pgdg-redhat96-9.6-3.noarch
/var/tmp/yum-root-tir6RZ/pgdg-redhat96-9.6-3.noarch.rpm をインストール済みとして設定しています
依存性の解決をしています
--> トランザクションの確認を実行しています。
---> パッケージ pgdg-redhat96.noarch 0:9.6-3 を インストール
--> 依存性解決を終了しました。
依存性を解決しました
================================================================================
Package アーキテクチャー
バージョン リポジトリー 容量
================================================================================
インストール中:
pgdg-redhat96 noarch 9.6-3 /pgdg-redhat96-9.6-3.noarch 2.7 k
トランザクションの要約
================================================================================
インストール 1 パッケージ
合計容量: 2.7 k
インストール容量: 2.7 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
インストール中 : pgdg-redhat96-9.6-3.noarch 1/1
file:///tmp/media/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /tmp/media/repodata/repomd.xml"
他のミラーを試します。
検証中 : pgdg-redhat96-9.6-3.noarch 1/1
インストール:
pgdg-redhat96.noarch 0:9.6-3
完了しました!
[root@web01 ~]#
[root@web01 ~]#
[root@web01 ~]# yum install postgresql96
読み込んだプラグイン:product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
file:///tmp/media/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /tmp/media/repodata/repomd.xml"
他のミラーを試します。
pgdg96 | 4.1 kB 00:00
(1/2): pgdg96/7Server/x86_64/primary_db | 197 kB 00:01
(2/2): pgdg96/7Server/x86_64/group_gz | 249 B 00:03
依存性の解決をしています
--> トランザクションの確認を実行しています。
---> パッケージ postgresql96.x86_64 0:9.6.8-1PGDG.rhel7 を インストール
--> 依存性の処理をしています: postgresql96-libs(x86-64) = 9.6.8-1PGDG.rhel7 のパッケージ: postgresql96-9.6.8-1PGDG.rhel7.x86_64
--> 依存性の処理をしています: libpq.so.5()(64bit) のパッケージ: postgresql96-9.6.8-1PGDG.rhel7.x86_64
--> トランザクションの確認を実行しています。
---> パッケージ postgresql96-libs.x86_64 0:9.6.8-1PGDG.rhel7 を インストール
--> 依存性解決を終了しました。
依存性を解決しました
================================================================================
Package アーキテクチャー
バージョン リポジトリー
容量
================================================================================
インストール中:
postgresql96 x86_64 9.6.8-1PGDG.rhel7 pgdg96 1.4 M
依存性関連でのインストールをします:
postgresql96-libs x86_64 9.6.8-1PGDG.rhel7 pgdg96 315 k
トランザクションの要約
================================================================================
インストール 1 パッケージ (+1 個の依存関係のパッケージ)
総ダウンロード容量: 1.7 M
インストール容量: 8.2 M
Is this ok [y/d/N]: y
Downloading packages:
(1/2): postgresql96-libs-9.6.8-1PGDG.rhel7.x86_64.rpm | 315 kB 00:01
(2/2): postgresql96-9.6.8-1PGDG.rhel7.x86_64.rpm | 1.4 MB 00:02
--------------------------------------------------------------------------------
合計 625 kB/s | 1.7 MB 00:02
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
インストール中 : postgresql96-libs-9.6.8-1PGDG.rhel7.x86_64 1/2
インストール中 : postgresql96-9.6.8-1PGDG.rhel7.x86_64 2/2
検証中 : postgresql96-9.6.8-1PGDG.rhel7.x86_64 1/2
検証中 : postgresql96-libs-9.6.8-1PGDG.rhel7.x86_64 2/2
インストール:
postgresql96.x86_64 0:9.6.8-1PGDG.rhel7
依存性関連をインストールしました:
postgresql96-libs.x86_64 0:9.6.8-1PGDG.rhel7
完了しました!
[root@web01 ~]#
[root@web01 ~]#
[root@web01 ~]#
[root@web01 ~]# yum install postgresql96-server
読み込んだプラグイン:product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
file:///tmp/media/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /tmp/media/repodata/repomd.xml"
他のミラーを試します。
依存性の解決をしています
--> トランザクションの確認を実行しています。
---> パッケージ postgresql96-server.x86_64 0:9.6.8-1PGDG.rhel7 を インストール
--> 依存性解決を終了しました。
依存性を解決しました
================================================================================
Package アーキテクチャー
バージョン リポジトリー
容量
================================================================================
インストール中:
postgresql96-server x86_64 9.6.8-1PGDG.rhel7 pgdg96 4.3 M
トランザクションの要約
================================================================================
インストール 1 パッケージ
総ダウンロード容量: 4.3 M
インストール容量: 18 M
Is this ok [y/d/N]: y
Downloading packages:
postgresql96-server-9.6.8-1PGDG.rhel7.x86_64.rpm | 4.3 MB 00:03
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
インストール中 : postgresql96-server-9.6.8-1PGDG.rhel7.x86_64 1/1
検証中 : postgresql96-server-9.6.8-1PGDG.rhel7.x86_64 1/1
インストール:
postgresql96-server.x86_64 0:9.6.8-1PGDG.rhel7
完了しました!
[root@web01 ~]#
[root@web01 ~]#
[root@web01 ~]#
[root@web01 ~]# /usr/pgsql-9.6/bin/postgresql96-setup initdb
Initializing database ... OK
[root@web01 ~]#
[root@web01 ~]#
[root@web01 ~]# systemctl enable postgresql-9.6
Created symlink from /etc/systemd/system/multi-user.target.wants/postgresql-9.6.service to /usr/lib/systemd/system/postgresql-9.6.service.
[root@web01 ~]#
[root@web01 ~]# systemctl start postgresql-9.6

-postgresql