PostgreSQLの環境構築

●ソースのダウンロード
ftp://ftp.sra.co.jp/pub/cmd/postgres/
こっから最新版をダウンロード。今回は7.4.3。
●グループ・ユーザ作成
グループpostgres、ユーザpostgresの作成
root権限で
/usr/sbin/groupadd postgres
/usr/sbin/useradd -m postgres -g postgres -d /home/postgres
●解凍
postgresユーザで行う
tar xvfz postgre・・・・
cd postgre・・・・
●インストール前に
オプション指定してconfigure
./configure --enable-multibyte=EUC_JP
gmake
cd contrib
gmake
cd ..
PostgreSQLをインストールするディレクトリの作成
root権限で
mkdir -p /usr/local/pgsql
chown postgres:postgres /usr/local/pgsql
●インストール
gmake install
cd contrib
gmake install