database.sarang.net
UserID
Passwd
Database
DBMS
MySQL
ㆍPostgreSQL
Firebird
Oracle
Informix
Sybase
MS-SQL
DB2
Cache
CUBRID
LDAP
ALTIBASE
Tibero
DB 문서들
스터디
Community
공지사항
자유게시판
구인|구직
DSN 갤러리
도움주신분들
Admin
운영게시판
최근게시물
PostgreSQL Q&A 7557 게시물 읽기
No. 7557
설치후 에러 메세지와 실행 관련 해서 질문좀 드릴게요.
작성자
최훈(baby169)
작성일
2008-11-13 10:25ⓒ
2008-11-13 13:05ⓜ
조회수
9,992

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틀 삽질중이에요 ㅠㅠ..

이 글에 대한 댓글이 총 2건 있습니다.

자문자답하게 되었네요^^;;;;

구글링 해본결과 기본포트가 5432 인데
전에 깔았 떤 postgresql이 사용중이여서 
포트를 바꾸라고 나와있길래 혹시나 하고 
/tmp 안에 파일 2개를 지우고 실행해보았떠니 되네요.. ^^


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


두 파일 삭제하고

# su - postgres
$ postdata -D /usr/local/pgsql/data &
$ LOG:  database system was shut down at 2008-11-13 12:47:22 KST
LOG:  checkpoint record is at 0/33E508
LOG:  redo record is at 0/33E508; undo record is at 0/0; shutdown TRUE
LOG:  next transaction ID: 565; next OID: 10794
LOG:  next MultiXactId: 1; next MultiXactOffset: 0
LOG:  database system is ready
LOG:  transaction ID wrap limit is 2147484146, limited by database "postgres"



$ createdb test
LOG:  transaction ID wrap limit is 2147484146, limited by database "postgres"
CREATE DATABASE


$ psql test

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help with psql commands
       \g or terminate with semicolon to execute query
       \q to quit
 
test=#

라고 나오네요.. ^^
그런데 LOG  라고 붙어 나오는 건 올래 저렇게 나오는건가요? ^^;;

ps.

포트 바꿔서 실행 예는
$ postmaster -D /usr/local/pgsql/data -p 6179

최훈님이 2008-11-13 13:03에 작성한 댓글입니다.
이 댓글은 2008-11-13 13:04에 마지막으로 수정되었습니다. Edit

네 원래 나오는거에요

서정주(moreta)님이 2008-11-13 14:22에 작성한 댓글입니다.
[Top]
No.
제목
작성자
작성일
조회
7560pg_dump와 query를 이용한 덤프방법?? [1]
이근수
2008-11-17
6959
7559create type으로 생성후 해당내용조회하는 방법좀 알려주세요 [1]
노지석
2008-11-13
6567
75588.3버젼에 slony-I설치 해보신분!! [1]
서정주
2008-11-13
6417
7557설치후 에러 메세지와 실행 관련 해서 질문좀 드릴게요. [2]
최훈
2008-11-13
9992
7556접속 비밀번호에 대해서.. [1]
관식
2008-11-12
6602
7555외래키와 트리거에 대해 질문 드리겠습니다. [4]
김하늘
2008-11-11
6676
7553새로 설치 후 스타트가 안되요 [1]
김태규
2008-11-06
6162
Valid XHTML 1.0!
All about the DATABASE... Copyleft 1999-2024 DSN, All rights reserved.
작업시간: 0.017초, 이곳 서비스는
	PostgreSQL v16.2로 자료를 관리합니다