* PostgreSQL 8.2 インストール [#k2b0c5e9]
** 必要なツール・ライブラリのインストール (CentOS6.4) [#w606cdea]
yum groupinstall "Development tools"
yum install readline-devel
yum install zlib-devel
** postgresユーザの作成 [#e0862ef9]
su -
# groupadd postgres
useradd -g postgres -d /usr/local/pgsql postgres
cat >> /usr/local/pgsql/.bashrc
export PATH=/usr/local/pgsql/bin:$PATH
** インストール [#o35799e0]
./configure --prefix=/usr/local/pgsql
make
make install
*** ソースコード [#te3565d5]
http://www.postgresql.org/ftp/source/
** 設定 [#pb82013a]
chmod 755 /usr/local/pgsql
chown postgres /usr/local/pgsql
mkdir /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
su - postgres
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data -E EUC-JP --no-locale
** 起動 [#q83ffa94]
su - postgres
/usr/local/pgsql/bin/pg_ctl start -D /usr/local/pgsql/data/
** 起動スクリプト [#a87c0b56]
cd /usr/local/src/postgres/postgresql-8.2.x/contrib/start-scripts
cp linux /etc/rc.d/init.d/postgresql
chmod 755 /etc/rc.d/init.d/postgresql
chkconfig --add postgresql
ソースツリーのpostgresql-8.2.x/contrib/start-scriptsディレクトリ以下にあるファイルを使う。pg_ctlを起動に使うのは推奨されないらしい。
** 参考 [#p6593b98]
http://www.postgresql.jp/