CentOS5.7にPostgresSQL9.1.2をyumでインストール

Feb 13, 2012
AD:

Postgresのサイトからrpmを取得
http://yum.postgresql.org/reporpms/

インストール

[php]
$ wget http://yum.postgresql.org/9.1/redhat/rhel-5-i386/pgdg-centos91-9.1-4.noarch.rpm
$ rpm -ivh pgdg-centos91-9.1-4.noarch.rpm
$ vi /etc/yum.repos.d/CentOS-Base.repo
[base]の中に下記のコメントを追加
exclude=postgresql*
[update]の中に下記のコメントを追加
exclude=postgresql*
$ yum -y install postgresql-server
Installed:
postgresql91-server.i386 0:9.1.2-1PGDG.rhel5
Dependency Installed:
postgresql91.i386 0:9.1.2-1PGDG.rhel5 postgresql91-libs.i386 0:9.1.2-1PGDG.rhel5
[/php]

初期設定

[php]
$ chkconfig postgresql-9.1 on
DBの初期化
$ service postgresql-9.1 initdb
データベースを初期化中: mkdir: ディレクトリ `/var/lib/pgsql/9.1/data/pg_log’ を作成できません: ファイルが存在します
$ rm -rf /var/lib/pgsql/9.1/data/pg_log/
$ service postgresql-9.1 initdb
データベースを初期化中: [ OK ]
$ service postgresql-9.1.2 start
postgresql-9.1 サービスを開始中: [ OK ]
$ su – postgres
$ psql -V
psql (PostgreSQL) 9.1.2
[/php]

設定関連

[php]
基本関係
$ vi /var/lib/pgsql/9.1/data/postgresql.conf
セキュリティ関係
$ vi /var/lib/pgsql/9.1/data/pg_hba.conf
[/php]

Related posts

AD:

No Comments, Comment or Ping

Reply to “CentOS5.7にPostgresSQL9.1.2をyumでインストール”

You must be logged in to post a comment.

Search Keyword

Meta

face Ayumi Mizoshiri
WEB developer

FacebookPage

Popular Posts

Sorry. No data so far.

ARCHIVES