mokky14's IT diary

IT関係の仕事メモ、勉強会の感想など書いてます。

CentOSにPostgresql 9.2をyumからインストール

CentOS6にPostgresqlのバージョン9.2をインストールしたときのメモ。
(CentOS 6に同梱されてるPostgresqlのバージョンは8.4)

ここを参考にインストール実施。

まずPostgresql9.2のyumリポジトリCentOSに登録。
ここからCentOS 6 - x86_64をダウンロード。
ダウンロードしたリポジトリパッケージファイルからリポジトリ追加。

[root@cent6 ~]# rpm -ivh ./pgdg-centos92-9.2-6.noarch.rpm 
警告: ./pgdg-centos92-9.2-6.noarch.rpm: ヘッダ V4 DSA/SHA1 Signature, key ID 442df0f8: NOKEY
準備中...                ########################################### [100%]
   1:pgdg-centos92          ########################################### [100%]

後はyumからパッケージ指定指定でインストール。

[root@cent6 ~]# yum install postgresql92-server postgresql92-devel postgresql92-contlib
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: ftp.tsukuba.wide.ad.jp
 * epel: mirror01.idc.hinet.net
 * extras: ftp.tsukuba.wide.ad.jp
 * updates: ftp.tsukuba.wide.ad.jp
pgdg92                                                   | 3.7 kB     00:00     
pgdg92/primary_db                                        | 102 kB     00:00     
Setting up Install Process
No package postgresql92-contlib available.
Resolving Dependencies
--> Running transaction check
---> Package postgresql92-devel.x86_64 0:9.2.8-1PGDG.rhel6 will be installed
--> Processing Dependency: postgresql92 = 9.2.8-1PGDG.rhel6 for package: postgresql92-devel-9.2.8-1PGDG.rhel6.x86_64
---> Package postgresql92-server.x86_64 0:9.2.8-1PGDG.rhel6 will be installed
--> Running transaction check
---> Package postgresql92.x86_64 0:9.2.8-1PGDG.rhel6 will be installed
--> Processing Dependency: postgresql92-libs = 9.2.8-1PGDG.rhel6 for package: postgresql92-9.2.8-1PGDG.rhel6.x86_64
--> Running transaction check
---> Package postgresql92-libs.x86_64 0:9.2.8-1PGDG.rhel6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                  Arch        Version                 Repository   Size
================================================================================
Installing:
 postgresql92-devel       x86_64      9.2.8-1PGDG.rhel6       pgdg92      1.4 M
 postgresql92-server      x86_64      9.2.8-1PGDG.rhel6       pgdg92      3.9 M
Installing for dependencies:
 postgresql92             x86_64      9.2.8-1PGDG.rhel6       pgdg92      973 k
 postgresql92-libs        x86_64      9.2.8-1PGDG.rhel6       pgdg92      187 k

Transaction Summary
================================================================================
Install       4 Package(s)

Total download size: 6.4 M
Installed size: 28 M
Is this ok [y/N]: y
Downloading Packages:
(1/4): postgresql92-9.2.8-1PGDG.rhel6.x86_64.rpm         | 973 kB     00:03     
(2/4): postgresql92-devel-9.2.8-1PGDG.rhel6.x86_64.rpm   | 1.4 MB     00:08     
(3/4): postgresql92-libs-9.2.8-1PGDG.rhel6.x86_64.rpm    | 187 kB     00:01     
(4/4): postgresql92-server-9.2.8-1PGDG.rhel6.x86_64.rpm  | 3.9 MB     00:23     
--------------------------------------------------------------------------------
Total                                           173 kB/s | 6.4 MB     00:37     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing : postgresql92-libs-9.2.8-1PGDG.rhel6.x86_64                   1/4 
  Installing : postgresql92-9.2.8-1PGDG.rhel6.x86_64                        2/4 
  Installing : postgresql92-server-9.2.8-1PGDG.rhel6.x86_64                 3/4 
  Installing : postgresql92-devel-9.2.8-1PGDG.rhel6.x86_64                  4/4 
  Verifying  : postgresql92-server-9.2.8-1PGDG.rhel6.x86_64                 1/4 
  Verifying  : postgresql92-9.2.8-1PGDG.rhel6.x86_64                        2/4 
  Verifying  : postgresql92-libs-9.2.8-1PGDG.rhel6.x86_64                   3/4 
  Verifying  : postgresql92-devel-9.2.8-1PGDG.rhel6.x86_64                  4/4 

Installed:
  postgresql92-devel.x86_64 0:9.2.8-1PGDG.rhel6                                 
  postgresql92-server.x86_64 0:9.2.8-1PGDG.rhel6                                

Dependency Installed:
  postgresql92.x86_64 0:9.2.8-1PGDG.rhel6                                       
  postgresql92-libs.x86_64 0:9.2.8-1PGDG.rhel6                                  

Complete!