Last active
March 26, 2017 15:06
-
-
Save dux/0893b55d8c07cf833aa9f7b807666cf3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ok article https://www.cyberciti.biz/tips/postgres-allow-remote-access-tcp-connection.html | |
but shorter and more accurate | |
1. in server manager as linode assign private IP address | |
2. ps aux | grep postgres | |
/usr/lib/postgresql/9.6/bin/postgres -D /var/lib/postgresql/9.6/main -c config_file=/etc/postgresql/9.6/main/postgresql.conf | |
3. open postgresql.conf and set | |
listen_addresses='*' | |
default is commented and defaults to localhost | |
vi find is "/" | |
4. in postgresql.conf there will be written location of hba_file | |
hba_file = '/etc/postgresql/9.6/main/pg_hba.conf' # host-based authentication file | |
open pg_hba.conf | |
# IPv4 local connections: | |
host all all 192.x.x.x/0 trust | |
dont forget subnet mask on IP, will not work if not added | |
5. sudo service postgresql restart | |
6. go to web or some other server in LAN | |
telnet 192.168.xxx.xx 5432 | |
should work |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment