Postgres SQL 직접 쓰는일이 없어 설치한적이 없었으나,
우연찮게 설치하게 될 일이 생겨 설치해 보았다.

특별한 사항은 없으며, 간단한 Quick Guide 만 올린다.

./configure --prefix=/usr/local/pgsql --with-md=EUC_KR
gmake install
adduser postgres
mkdir /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
su - postgres
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
/usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data >logfile 2>&1 &
/usr/local/pgsql/bin/createdb test
/usr/local/pgsql/bin/psql test

Postmaster 데몬 띄울때 에러날 경우 Logfile을 먼저 보라.
FATAL:  XX000: failed to initialize lc_messages to ""
와 같은 에러가 나면 자신의 profile을 확인하여
export Lang을 재설정 하면 된다.

PostgresSQL의 버그인데 그에 대한 참고로 내용을 올린다.

The following bug has been logged online:

Bug reference:      1716
Logged by:          steve owen
Email address:      steve ( at ) keymarksystems ( dot ) com
PostgreSQL version: 7.4.8
Operating system:   RHEL4
Description:        FATAL:  XX000: failed to initialize lc_messages to ""

I found this referenced under bug #1344: locale problem

The problem appears to be in going from Linux 2.6.9-5.0.5 to 2.6.9-11 the
default LANG environment variable changed
from LANG=en_US.UTF-8 to LANG=english_us.8859.  Error could be identified by
typing locale at the opsys prompt.
I fixed by adding to posgres .bash_profile:
  LANG=en_US.UTF-8; export LANG

hopes this helps someone else

Comment +0