1. PostgreSQL 포트 설정

vi [pg_data 위치]/postgresql.conf

port = '원하는 포트'

 

 

2. PostgreSQL 접근 ip 설정

vi [pg_data위치]/pg_hba.conf

# 맨 밑 부분 
# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     trust
# IPv4 local connections:
host    all             all             127.0.0.1/32            trust
# 해당 행은 10.10.50으로 시작하는 ip는 허용한다는 뜻
host    all             all             10.10.50.0/24           md5
# IPv6 local connections:
host    all             all             ::1/128                 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
local   replication     all                                     trust
host    replication     all             127.0.0.1/32            trust
host    replication     all             ::1/128                 trust

 

 

 

 

 

 

 

반응형

+ Recent posts