공식 웹 사이트에서 PostgreSQL을 다운로드하고 .dmg 설치 프로그램을 실행했습니다. 그 후 pgadmin3을 다운로드했는데 실제로 데이터베이스에 연결할 수 있습니다. 나는 약간 $의 PATH 문제에 대한 읽을 인터넷 검색의 시간 후에OSX Lion에 PostgreSQL 9.1을 설치하는 방법
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
, 그래서 난 내 .bashrc에이 점을 넣어 :
export PATH=/Library/PostgreSQL/9.1/bin:$PATH
내가 'psql의'나는 다음과 같은 오류가 실행
그러나 이것은 위의 오류를 전혀 해결하지 못합니다. 검색 좀 더 많은 시간을 보낸 후 'psql -l localhost -U postgres'를 실행하려고했습니다. 내가 /Library/PostgreSQL/9.1/data/pg_hba.conf을 편집 시도하고 '신뢰'와 'MD5'의 모든 항목을 대체 인터넷 검색을 좀 더 후
psql: could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (fe80::1) and accepting
TCP/IP connections on port 5432?
: 이것은 또 다른 오류를 제공합니다.
그러면 사용자를 postgres로 변경하고 'pg_ctl stop'및 'pg_ctl start'를 실행하고 내 사용자에게 다시 전환하여 다시 연결을 시도했습니다. 내가 설치 프로그램의 README가 제시 한 값 추가 /etc/sysctl.conf에에서 :
[~]$ which psql
/Library/PostgreSQL/9.1/bin/psql
ps aux | grep postgres
postgres 19022 0.0 0.0 2446096 484 ?? Ss 11:31PM 0:00.01 postgres: stats collector process
postgres 19021 0.0 0.0 2486532 1776 ?? Ss 11:31PM 0:00.01 postgres: autovacuum launcher process
postgres 19020 0.0 0.0 2486400 576 ?? Ss 11:31PM 0:00.03 postgres: wal writer process
postgres 19019 0.0 0.0 2486400 820 ?? Ss 11:31PM 0:00.05 postgres: writer process
postgres 19017 0.0 0.0 2446096 356 ?? Ss 11:31PM 0:00.01 postgres: logger process
postgres 19015 0.0 0.1 2486400 8216 s001 S 11:31PM 0:00.17 /Library/PostgreSQL/9.1/bin/postgres
sudo find/-name .s.PGSQL.5432
No file was found?!?
업데이트 1 :
여기에 좀 더 많은 정보를 정기적으로있는 이러한 설정하기 전에
kern.sysv.shmmax=1610612736
kern.sysv.shmall=393216
kern.sysv.shmmin=1
kern.sysv.shmmni=32
kern.sysv.shmseg=8
kern.maxprocperuid=512
을의 설치 프로그램이 오류와 함께 종료되면 마법사가 나타나서 postgres를 설치합니다. (다시 pgadmin3이 작동하므로 데이터베이스가 정상적으로 실행되고 있다고 가정합니다.)
서버 로그 출력을 보았습니까? 종종 새로운 OS X 설치시 Postgres는 공유 메모리 제한으로 인해 시작되지 않습니다. http://willbryant.net/software/mac_os_x/postgres_initdb_fatal_shared_memory_error_on_leopard – bdon
로그를 체크하면 방금 서버 정지 및 시작 메시지가 많이 표시되고 오류는 없습니다. 조금도. 내 게시물을 편집하고 공유 메모리에 대한 단어를 추가합니다. 설치 프로그램의 README에서 요청한 것을 수행 한 것 같습니다. – mbrochh