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
退出数据库:\q
修改PostgreSQL 密码:
http://www.360doc.com/content/13/0822/10/10384031_309039914.shtml