一、安装psql
yum install postgresql-server postgresql-contrib postgresql-devel postgresql postgresql-libs
service postgresql initdb
systemctl start postgresql
二、配置远程访问
vi /var/lib/pgsql/data/postgresql.conf listen_addresses = '*'
vi /var/lib/pgsql/data/pg_hba.conf
host all all 0.0.0.0/0 trust
local all all trust
local -> peer
127.0.0.1 -> ident peer和ident都是基于操作系统的认证