#! /bin/sh
PGSQL_VER=postgresql-7.4.6
PGSQL_DIR=/usr/local/pgsql
BASH_PROFILE=.bash_profile
mkdir -p $PGSQL_DIR
useradd -d $PGSQL_DIR postgres
tar zxvf $PGSQL_VER.tar.gz
cd $PGSQL_VER
./configure \
--enable-multibyte=EUC_JP \
--with-openssl=/usr/local/ssl
make all
make install
cd ~postgres
cat >> $BASH_PROFILE < < EOF #========================== # PostgreSQL Configuration #========================== PATH=\$PATH:\$HOME/bin:$PGSQL_DIR/bin export POSTGRES_HOME=$PGSQL_DIR export PGDATA=$PGSQL_DIR/data export PGLIB=$PGSQL_DIR/lib export LD_LIBRARY_PATH=$PGSQL_DIR/lib EOF