2010/08/19

[Postgres Install]

# useradd postgres
# tar zxf postgresql-8.4.4.tar.gz
# cd postgresql-8.4.4
# ./configure
# make
# make install
# cat contrib/start-scripts/linux |\
sed -e "s/-s -l/-o \'-i\' -s -l/g" |\
sed -e "s/-s -m/-o \'-i\' -s -m/g" > /etc/init.d/postgres
# chmod 755 /etc/init.d/postgres
# chkconfig --add postgres
# mkdir /var/log/postgresql
# chown postgres:adm /var/log/postgresql
# chmod 750 /var/log/postgresql

# vi /home/postgres/.bash_profile
#LANG=ja_JP.eucJP
LANG=ja_JP.UTF-8
PATH=${PATH}:/usr/local/pgsql/bin:/home/postgres/bin
MANPATH=${MANPATH}:/usr/local/pgsql/man
PGDATA=/usr/local/pgsql/data
PGLIB=/usr/local/pgsql/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PGLIB
export LANG PATH MANPATH PGDATA PGLIB LD_LIBRARY_PATH

# vi /home/postgres/.bashrc
#LANG=ja_JP.eucJP
LANG=ja_JP.UTF-8
export LANG

# mkdir /usr/local/pgsql/data
# chown postgres:postgres /usr/local/pgsql/data

# su - postgres
$ initdb
$ exit
# /etc/init.d/postgres start

0 件のコメント:

コメントを投稿