OS 는 freebsd 7.0
postgresql 8.1 버젼을 인스톨 하고 있습니다.
여러번 포트로 설치 한 후 계속 실패 하여
어제 하루 날려 먹고...
지금은 소스로 설치 하였습니다.
유저는 postgres 주고
유저디렉토리는 /usr/local/pgsql
/usr/local/pgsql 밑에 data 디렉토리 생성 후
chown -R postgres:postgres /usr/local/pgsql 작업해주었구요.
postgres .shrc 에 환경 변수 넣어 주었구요
export PATH=$PATH:/usr/local/pgsql/bin
export MANPATH=$MANPATH:/usr/local/pgsql/man
export PGLIB=/usr/local/pgsql/lib
export PGDATA=/usr/local/pgsql/data
:wq!
su - postgres 이후
init db 는 잘 됩니다.
---------------------------------------------------------------------------------
$ postmaster -D /usr/local/pgsql/data
FATAL: could not open lock file "/tmp/.s.PGSQL.5432.lock": Permission denied
$ pg_ctl -D /usr/local/pgsql/data -l logfile start
postmaster starting
$ createdb test
createdb: could not connect to database postgres: could not connect to server: Connection refused
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
createdb 시 오류가 나길래 보니 실행이 안되있어서 그렇다 하더라구요.
---------------------------------------------------------------------------------
그래서 소스설치한 곳 가서
cp /contrib/start-scripts/freebsd /usr/local/etc/rc.d/postgresql
chmod 755 /usr/local/etc/rc.d/postgresql
cd /usr/local/etc/rc.d/
---------------------------------------------------------------------------------
해주고나서 실행 sh postgresql start 했더니
test# postgresql
postgresql test#
---------------------------------------------------------------------------------
# ll /tmp
drwxrwxrwt 2 root wheel 512 11 12 17:19 .ICE-unix
drwxrwxrwt 2 root wheel 512 11 12 17:19 .X11-unix
drwxrwxrwt 2 root wheel 512 11 12 17:19 .XIM-unix
drwxrwxrwt 2 root wheel 512 11 12 17:19 .font-unix
srwxrwxrwx 1 pgsql wheel 0 11 11 09:32 .s.PGSQL.5432
-rw------- 1 pgsql wheel 27 11 11 09:32 .s.PGSQL.5432.lock
drwxrwxr-x 2 root operator 512 10 30 19:56 .snap
-rwxr-xr-x 1 root wheel 4669 11 3 11:05 gpac-conf--47057-
drwxr-xr-x 3 root wheel 512 11 4 16:22 pear
# vi .s.PGSQL.5432.lock
5549
/usr/local/pgsql/data
# ps ax | grep post
16881 p1 S+ 0:00.00 grep post
이렇게만 나오고 실행이 안됩니다.
어떻게 해야 실행 할 수 있나요.^^
postgresql 처음 설치라 조금 당황되네요. 한수 부탁드립니다^^
2틀 삽질중이에요 ㅠㅠ.. |