Access other server postgres
In postgres server
- finding
pg_hab.conf
you can find with next command
# login with sudo user
# you can skip but you have to write sudo command
sudo -s
# finding pg_hba
find / -type f -name "pg_hba.conf"
- edit setting in
pg_hab.conf
# go to pg_hab.conf dir # it's different between psql install dir cd /etc/postgresql/9.3/main # open pg_hba.conf vim pg_hba.conf
Add following line in ip address of client machine
host all all x.x.x.x/24 trust
- edit
postgresql.conf
vim postgresql.conf
Add wildcardw in listen address
maybe there’s already listen_address setting and you have to find with / and change to next setting
listen_addresses = '*'
- restart postgresql
# you can use other command to restart sudo service restart postgresql
If using aws, you should open security group: TCP: 5432
'backend > sql (postgres)' 카테고리의 다른 글
Mac (OS X)에 postgres 설치하기 (sierra 10.12.6) (0) | 2017.11.28 |
---|---|
ubuntu postgres systemctl restart 명령어 (0) | 2017.11.22 |
postgres 작동 안될 때 list-dependencies 확인하기 (0) | 2017.11.15 |
postgres basic usage-about Role (0) | 2017.10.22 |
Postgres restart in ubuntu 16.04 (0) | 2017.10.14 |