Sep 07, 2008
CentOS 5 に PostgreSQL をインストール
CentOS 5 に PostgreSQL をインストールしたときのメモ。 CentOS 5 にデフォルト状態で設定されている yum のリポジトリには 2008/09/07 現在 PostgreSQL 8.1.11 しか登録されていない。 今回は 8.1 ではなく 8.2 をインストールしたいので、8.2 をインストール出来るよう設定をしてみた。
- RepoView: PostgreSQL PGDG Repository RPMs - Letter P
- http://yum.pgsqlrpms.org/reporpms/repoview/letter_p.group.html
- pgdg-centos - PostgreSQL 8.4.X PGDG RPMs for CentOS - Yum Repository Configuration
- http://yum.pgsqlrpms.org/reporpms/repoview/pgdg-centos.html
CentOS 5 のデフォルト状態
CentOS 5 をクリーンインストールした直後はこんな感じ。
# yum search postgresql postgresql-server.i386 : The programs needed to create and run a PostgreSQL server. postgresql-docs.i386 : Extra documentation for PostgreSQL perl-DBD-Pg.i386 : A PostgresSQL interface for perl qt4-postgresql.i386 : PostgreSQL drivers for Qt's SQL classes postgresql-test.i386 : The test suite distributed with PostgreSQL. libdbi-dbd-pgsql.i386 : PostgreSQL plugin for libdbi postgresql-devel.i386 : PostgreSQL development header files and libraries. php-pdo.i386 : A database access abstraction module for PHP applications freeradius-postgresql.i386 : postgresql bindings for freeradius postgresql-contrib.i386 : Contributed source and binaries distributed with PostgreSQL php-pgsql.i386 : A PostgreSQL database module for PHP. qt-PostgreSQL.i386 : PostgreSQL drivers for Qt's SQL classes. php-pgsql.i386 : A PostgreSQL database module for PHP. postgresql-libs.i386 : The shared libraries required for any PostgreSQL clients. postgresql-pl.i386 : The PL procedural languages for PostgreSQL. postgresql-libs.i386 : The shared libraries required for any PostgreSQL clients. rhdb-utils.i386 : Miscellaneous utilities for PostgreSQL - CentOS Edition. mod_auth_pgsql.i386 : Basic authentication for the Apache web server using a PostgreSQL database. unixODBC.i386 : A complete ODBC driver manager for Linux. mono-data-postgresql.i386 : Postgresql database connectivity for Mono postgresql-jdbc.i386 : JDBC driver for PostgreSQL php-pdo.i386 : A database access abstraction module for PHP applications postgresql.i386 : PostgreSQL client programs and libraries. bind-sdb.i386 : The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) server with database backends. bind-sdb.i386 : The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) server with database backends. pdns-backend-postgresql.i386 : PostgreSQL backend for pdns bind-sdb.i386 : The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) server with database backends. postgresql-python.i386 : Development module for Python code to access a PostgreSQL DB. postgresql-odbc.i386 : PostgreSQL ODBC driver. postgresql-tcl.i386 : A Tcl client library for PostgreSQL. # yum install postgresql-server Setting up Install Process Parsing package install arguments Resolving Dependencies --> Running transaction check ---> Package postgresql-server.i386 0:8.1.11-1.el5_1.1 set to be updated --> Processing Dependency: postgresql = 8.1.11-1.el5_1.1 for package: postgresql-server --> Running transaction check ---> Package postgresql.i386 0:8.1.11-1.el5_1.1 set to be updated --> Finished Dependency Resolution Dependencies Resolved ============================================================================= Package Arch Version Repository Size ============================================================================= Installing: postgresql-server i386 8.1.11-1.el5_1.1 base 3.9 M Installing for dependencies: postgresql i386 8.1.11-1.el5_1.1 base 2.9 M Transaction Summary ============================================================================= Install 2 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 6.7 M Is this ok [y/N]: N Exiting on user Command Complete!
yum の設定
yum に PostgreSQL のリポジトリを登録する。 今回は訳あって 8.3 ではなく 8.2 が必要なので、8.2 用のリポジトリを登録する。
# wget http://yum.pgsqlrpms.org/reporpms/8.2/pgdg-centos-8.2-4.noarch.rpm --17:44:40-- http://yum.pgsqlrpms.org/reporpms/8.2/pgdg-centos-8.2-4.noarch.rpm (略) 17:44:40 (2.88 MB/s) - `pgdg-centos-8.2-4.noarch.rpm' saved [4311/4311] # rpm -ivh ./pgdg-centos-8.2-4.noarch.rpm Preparing... ########################################### [100%] 1:pgdg-centos ########################################### [100%]
PostgreSQL のインストール
リポジトリの登録が終わったので、早速 PostgreSQL 8.2 をインストールしてみる。
# yum search postgresql pgdg82 100% |=========================| 1.9 kB 00:00 primary.sqlite.bz2 100% |=========================| 45 kB 00:00 python-psycopg2-doc.i386 : Documentation for psycopg python PostgreSQL database adapter slony1-docs.i386 : Documentation for Slony-I python-psycopg2-doc.i386 : Documentation for psycopg python PostgreSQL database adapter pgpool-II-debuginfo.i386 : Debug information for package pgpool-II pgpool-II-devel.i386 : The development files for pgpool-II pgpool-debuginfo.i386 : Debug information for package pgpool pgpool-II.i386 : Pgpool is a connection pooling/replication server for PostgreSQL perl-DBD-Pg.i386 : A PostgresSQL interface for perl postgresql-plpython.i386 : The Python procedural language for PostgreSQL postgresql-jdbc.i386 : JDBC driver for PostgreSQL postgresql-libs.i386 : The shared libraries required for any PostgreSQL clients. postgresql-libs.i386 : The shared libraries required for any PostgreSQL clients. dbi-link.noarch : Partial implementation of the SQL/MED portion of the SQL:2003 specification postgresql-test.i386 : The test suite distributed with PostgreSQL. skytools.i386 : PostgreSQL database management tools from Skype libpqxx.i386 : C++ client API for PostgreSQL pgsphere.i386 : R-Tree implementation using GiST for spherical objects bind-sdb.i386 : The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) server with database backends. pdns-backend-postgresql.i386 : PostgreSQL backend for pdns pgdg-redhat.noarch : PostgreSQL 8.2.X PGDG RPMs for RHEL - Yum Repository Configuration postgresql-odbc.i386 : PostgreSQL ODBC driver phpPgAdmin.noarch : Web-based PostgreSQL administration postgresql-docs.i386 : Extra documentation for PostgreSQL pgpool.i386 : Pgpool is a connection pooling/replication server for PostgreSQL qt4-postgresql.i386 : PostgreSQL drivers for Qt's SQL classes postgresql-pltcl.i386 : The Tcl procedural language for PostgreSQL python-psycopg2.i386 : A PostgreSQL database adapter for Python odbcng.i386 : PostgreSQL ODBCng driver postgresql-libs.i386 : The shared libraries required for any PostgreSQL clients postgresql-test.i386 : The test suite distributed with PostgreSQL postgresql-python.i386 : Development module for Python code to access a PostgreSQL DB postgresql-tcl-debuginfo.i386 : Debug information for package postgresql-tcl php-pgsql.i386 : A PostgreSQL database module for PHP. postgresql-plperl.i386 : The Perl procedural language for PostgreSQL postgresql-tcl.i386 : Tcl client library for PostgreSQL ptop.i386 : 'top' for PostgreSQL process ip4r.i386 : IPv4 and IPv4 range index types for PostgreSQL postgresql-contrib.i386 : Contributed source and binaries distributed with PostgreSQL table_log.i386 : Log data changes in a PostgreSQL table unixODBC.i386 : A complete ODBC driver manager for Linux. postgis.i386 : Geographic Information Systems Extensions to PostgreSQL python-psycopg2.i386 : A PostgreSQL database adapter for Python pgfouine.noarch : PgFouine PostgreSQL log analyzer postgresql-devel.i386 : PostgreSQL development header files and libraries. postgresql-server.i386 : The programs needed to create and run a PostgreSQL server postgresql-jdbc-debuginfo.i386 : Debug information for package postgresql-jdbc postgresql-devel.i386 : PostgreSQL development header files and libraries pgdg-centos.noarch : PostgreSQL 8.2.X PGDG RPMs for CentOS - Yum Repository Configuration postgresql-odbc.i386 : PostgreSQL ODBC driver. postgresql-tcl.i386 : A Tcl client library for PostgreSQL. postgis.i386 : Geographic Information Systems Extensions to PostgreSQL postgresql-odbc-debuginfo.i386 : Debug information for package postgresql-odbc postgresql-python-debuginfo.i386 : Debug information for package postgresql-python slony1-docs.i386 : Documentation for Slony-I pgplsh.i386 : Sh shell procedural language handler for PostgreSQL postgresql-contrib.i386 : Contributed source and binaries distributed with PostgreSQL usda-r18.noarch : The USDA Food Database Sample for PostgreSQL qt-PostgreSQL.i386 : PostgreSQL drivers for Qt's SQL classes. php-pgsql.i386 : A PostgreSQL database module for PHP. postgresql-debuginfo.i386 : Debug information for package postgresql pgadmin3.i386 : Graphical client for PostgreSQL rhdb-utils.i386 : Miscellaneous utilities for PostgreSQL - CentOS Edition. mono-data-postgresql.i386 : Postgresql database connectivity for Mono pgpool-II.i386 : Pgpool is a connection pooling/replication server for PostgreSQL pgdg-centos.noarch : PostgreSQL 8.2.X PGDG RPMs for CentOS - Yum Repository Configuration bind-sdb.i386 : The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) server with database backends. python-psycopg2-zope.i386 : Zope Database Adapter ZPsycopgDA postgresql-server.i386 : The programs needed to create and run a PostgreSQL server. plruby.i386 : PostgreSQL Ruby Procedural Language slony1.i386 : A "master to multiple slaves" replication system with cascading and failover libdbi-dbd-pgsql.i386 : PostgreSQL plugin for libdbi php-pdo.i386 : A database access abstraction module for PHP applications freeradius-postgresql.i386 : postgresql bindings for freeradius postgresql-pl.i386 : The PL procedural languages for PostgreSQL. postgresql-docs.i386 : Extra documentation for PostgreSQL compat-postgresql-libs-debuginfo.i686 : Debug information for package compat-postgresql-libs pagila.noarch : A sample database for PostgreSQL slony1.i386 : A "master to multiple slaves" replication system with cascading and failover python-psycopg2-zope.i386 : Zope Database Adapter ZPsycopgDA mod_auth_pgsql.i386 : Basic authentication for the Apache web server using a PostgreSQL database. pgpool-II-devel.i386 : The development files for pgpool-II postgresql-jdbc.i386 : JDBC driver for PostgreSQL php-pdo.i386 : A database access abstraction module for PHP applications postgresql.i386 : PostgreSQL client programs and libraries. bind-sdb.i386 : The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) server with database backends. postgresql.i386 : PostgreSQL client programs and libraries postgresql-python.i386 : Development module for Python code to access a PostgreSQL DB. compat-postgresql-libs.i686 : PostgreSQL client programs and libraries pgpool-II-debuginfo.i386 : Debug information for package pgpool-II # yum install postgresql-server Setting up Install Process Parsing package install arguments Resolving Dependencies --> Running transaction check ---> Package postgresql-server.i386 0:8.2.9-1PGDG.rhel5 set to be updated --> Processing Dependency: postgresql = 8.2.9 for package: postgresql-server --> Processing Dependency: libpq.so.5 for package: postgresql-server --> Running transaction check ---> Package postgresql-libs.i386 0:8.2.9-1PGDG.rhel5 set to be updated --> Processing Dependency: libpq.so.4 for package: apr-util ---> Package postgresql.i386 0:8.2.9-1PGDG.rhel5 set to be updated --> Running transaction check ---> Package compat-postgresql-libs.i686 0:4-1PGDG.rhel5 set to be updated --> Finished Dependency Resolution Dependencies Resolved ============================================================================= Package Arch Version Repository Size ============================================================================= Installing: postgresql-server i386 8.2.9-1PGDG.rhel5 pgdg82 4.0 M Updating: postgresql-libs i386 8.2.9-1PGDG.rhel5 pgdg82 196 k Installing for dependencies: compat-postgresql-libs i686 4-1PGDG.rhel5 pgdg82 63 k postgresql i386 8.2.9-1PGDG.rhel5 pgdg82 1.6 M Transaction Summary ============================================================================= Install 3 Package(s) Update 1 Package(s) Remove 0 Package(s) Total download size: 5.9 M Is this ok [y/N]: y Downloading Packages: (1/4): postgresql-server- 100% |=========================| 4.0 MB 00:12 (2/4): postgresql-8.2.9-1 100% |=========================| 1.6 MB 00:02 (3/4): compat-postgresql- 100% |=========================| 63 kB 00:00 (4/4): postgresql-libs-8. 100% |=========================| 196 kB 00:00 Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Updating : postgresql-libs ######################### [1/5] Installing: postgresql ######################### [2/5] Installing: compat-postgresql-libs ######################### [3/5] Installing: postgresql-server ######################### [4/5] Cleanup : postgresql-libs ######################### [5/5] Installed: postgresql-server.i386 0:8.2.9-1PGDG.rhel5 Dependency Installed: compat-postgresql-libs.i686 0:4-1PGDG.rhel5 postgresql.i386 0:8.2.9-1PGDG.rhel5 Updated: postgresql-libs.i386 0:8.2.9-1PGDG.rhel5 Complete! # psql --version psql (PostgreSQL) 8.2.9 contains support for command-line editing #
TrackBack ping me at
http://www.in-vitro.jp/blog/index.cgi/Linux/20080907_01.trackback
writeback message: Ready to post a comment.
