It's raining cats and dogs.

無駄なことなんてないはず

ポスグレのインストールぐらいはやっとく

グループとユーザ作る

# groupadd postgres
# useradd -g postgres postgres
# passwd postgres

いろいろライブラリを入れておく

postgres$ sudo yum -y install readline-devel ncurses-devel zlib-devel

解凍&移動

postgres$ tar zxvf postgresql-8.2.4.tar.gz
postgres$ cd postgresql-8.2.4

コンフィギャ

postgres$ ./configure

めんどくさいのでデフォルトで。
パラメタの説明
http://www.postgresql.jp/document/pg824doc/html/install-procedure.html

インストール

postgres$ make
postgres$ sudo make install

インストール先のディレクトリのオーナーを変えておく

# chown -R postgres:postgres /usr/local/pgsql

パス通したり

男らしく/etc/profileに追記

vi /etc/profile
export PATH=$PATH:/usr/local/pgsql/bin
export PG=/usr/local/pgsql
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PG/lib
export PGLIB=$PG/lib
export PGDATA=$PG/data
export MANPATH=$MANPATH:/usr/local/pgsql/man

DB初期化

postgres$ initdb -E UNICODE --no-locale

UNICODE」はUTF-8のこと。
「--no-locale」をつけないと日本語のソートとかがおかしくなるとかならないとか。

自動起動の設定

# cp /home/postgres/postgresql-8.2.4/contrib/start-scripts/linux /etc/init.d/postgres
# chmod 755 /etc/init.d/postgres
# chkconfig postgres on