CentOS7 PostgreSQL安装
Install
安装
使用yum安装
yum install http://yum.postgresql.org/9.4/redhat/rhel-6-x86_64/pgdg-redhat94-9.4-1.noarch.rpm
yum install postgresql94-server postgresql94-contrib
设置开机启动
systemctl enable postgresql-9.4.service
systemctl start postgresql-9.4.service
初始化数据库
/usr/pgsql-9.4/bin/postgresql94-setup initdb
开启远程访问
/var/lib/pgsql/9.4/data/postgresql.conf
listen_addresses ='*'
/var/lib/pgsql/9.4/data/pg_hba.conf
# IPv4 local connections:host all all 127.0.0.1/32 trusthost all all 192.168.117.1/32 trust# IPv6 local connections:host all all ::1/128 trust
评论列表()