Postgresql 安装
#yum install postgresql93-server postgresql93-contrib
#service postgresql-9.3 initdb
// 设置postgresql 自动启动
#chkconfig postgresql-9.3 on
#vi /var/lib/pgsql/9.3/data/pg_hba.conf
(replace "ident" with "md5")
(new config line)host all all 192.168.1.1(localhost ip)/16 md5
#vi /var/lib/pgsql/9.3/data/postgresql.conf
listen_addresses = '*'
port = 5432
#su - conversant
$sudo service postgresql-9.3 start
$sudo su - postgres
$psql
postgres=# alter user postgres with password 'qa654321';
postgres=# create database testdb;
$sudo su - postgres
$psql -d testdb-U postgres
testdb=#\i /opt/app/xxxx-Postgresql.sql
$sudo /sbin/iptables -I INPUT -p tcp --dport 5432 -j ACCEPT
$sudo /etc/rc.d/init.d/iptables save
$sudo /etc/init.d/iptables status
http://www.360doc.com/content/13/0822/10/10384031_309039914.shtml
原文链接:https://www.f2er.com/postgresql/194665.html