Last active
August 29, 2015 14:00
-
-
Save lpf23/3d8f3000431818f8d050 to your computer and use it in GitHub Desktop.
Installing postgres on CentOS - pg_hba.conf modifications
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
1) # yum install postgresql postgresql-server | |
2) # chkconfig postgresql on | |
3) # service postgresql start | |
4) # sudo -s | |
5) # su - postgres | |
6) $ psql -d template1 -U postgres | |
7) ALTER USER postgres WITH PASSWORD '<newpassword>'; | |
8) \q | |
9) # cd /var/lib/psql/data | |
10) # vi pg_hba.conf | |
Use password authentication (pgAdmin can connect!): | |
# IPv4 local connections: | |
host all all 127.0.0.1/32 md5 | |
# IPv6 local connections: | |
host all all ::1/128 md5 | |
11) # service postgresql restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment