Skip to content

Instantly share code, notes, and snippets.

@dosbol
Last active July 17, 2018 08:45
Show Gist options
  • Save dosbol/c70ca413a6c4a66f91f7235579c56cc3 to your computer and use it in GitHub Desktop.
Save dosbol/c70ca413a6c4a66f91f7235579c56cc3 to your computer and use it in GitHub Desktop.
rpm -ivh https://yum.postgresql.org/9.6/redhat/rhel-6-x86_64/pgdg-centos96-9.6-3.noarch.rpm
yum install postgresql96 postgresql96-server postgresql96-libs postgresql96-contrib postgresql96-devel
service postgresql-9.6 initdb
vi /var/lib/pgsql/9.6/data/pg_hba.conf
host all all 0.0.0.0/0 md5
host all all ::1/128 md5
cat /var/lib/pgsql/9.6/data/postgresql.conf
listen_addresses = '*'
#start automatically when the OS starts
chkconfig postgresql-9.6 on
service postgresql-9.6 start
yum install postgis24_96
iptables -I INPUT -p tcp -m tcp --dport 5432 -j ACCEPT
service iptables save
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment