PostgreSQL 9.6 Installing and configuring remote connections

Source: Internet
Author: User
Tags postgresql



Version postgresql9.6,centos_7,








1. Install with Yum and install the RPM source.



Yum Install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm






2. Yum Installation



Yum Install postgresql96



Yum Install Postgresql96-server






3. Install and start



Cd/usr/pgsql-9.6/bin



./Postgresql96-setup Initdb



Systemctl Start postgresql-9.6






4. Configure remote connection and modify default password



Su Postgres



Psql



Alter user postgres with password ' 123456 '; #Change the default password










cd/var/lib/pgsql/9.6/data/



Vim pg_hda.conf



Modify the following





# TYPE DATABASE USER cidr-address METHOD



Host all 0.0.0.0/0 MD5 #Allow any ip access





Vim postgresql.conf





Modify





Li sten_addresses = '*' #Listen all


(Pay attention to shutting down the firewall or opening port)












PostgreSQL 9.6 Installing and configuring remote connections


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.