Installing Configuration PostgreSQL

Source: Internet
Author: User

Turn off SELinux
Getenforce
Setenfroce 0
Vi/etc/selinux/config
Selinux=disabled
selinuxtype=targeted
Shutting down the firewall
#chkconfig iptables off
#service iptables Stop

Installing Pgsql
# rpm--FORCE-IVH openssl-1.0.1e-42.el6.x86_64.rpm postgresql94-libs-9.4.6-1pgdg.rhel6.x86_64.rpm postgresql94-9.4.6-1pgdg.rhel6.x86_64.rpm postgresql94-server-9.4.6-1pgdg.rhel6.x86_64.rpm postgresql94-contrib-9.4.6-1pgdg.rhel6.x86_64.rpm
#sudo rpm-aq| grep postgres
#sudo Service postgresql-9.4 Initdb
#sudo Service postgresql-9.4 Start
#sudo Chkconfig postgresql-9.4 on

Pgsql Configuration
# nano/var/lib/pgsql/9.4/data/postgresql.conf
Modify the following two parameters:
listen_addresses = ' * '
Port = 5432
# nano/var/lib/pgsql/9.4/data/pg_hba.conf
Modify the parameters as follows:
# IPV4 Local connections:
Host All 127.0.0.1/32 Trust

Reload the configuration file and restart the database:
#/etc/init.d/postgresql-9.4 Reload
#service postgresql-9.4 Restart

#su –postgres
Psql
Alter user postgres with password ' 123456 ';
Create user sample with password ' 123456 ';
Create database sample;

Installing Configuration PostgreSQL

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.