2011年3月4日金曜日

PostgreSQL84をredhat EL4 に入れてみた

Redhat EL4でPostgreSQL8.4を使う機会があったのでメモ

コミュニティのリポジトリを使う
コミュニティのリポジトリを使うための設定ファイルの入手
> wget http://yum.pgsqlrpms.org/reporpms/8.4/pgdg-redhat-8.4-2.noarch.rpm
そして入れる
> rpm -ivh pgdg-redhat-8.4-2.noarch.rpm
入ったか確認
> ls -l /etc/yum.repos.d/
pgdg-84-redhat.repoが一覧に入っていたらOK

/etc/yum.repos.d/の他のリポジトリからpostgresql関連のものを持ってこさせなくする
/etc/yum.repos.d/の他のリポジトリのファイルのenabled=1のセクションにexclude=postgresql*を追記する

準備オッケー!

PostgreSQL8.4が探せるかチェック
> yum search postgresql

インストールする
postgresql-serverを入れたら必要そうなのは大体入る
> yum install postgresql-server

起動設定
> chkconfig postgresql on

DB初期化
> /etc/init.d/postgresql initdb

必要であれば/var/lib/pgsql/data内の設定ファイルで設定を変える

起動
> /etc/init.d/postgresql start

0 件のコメント: