rpm -ivh http://download.postgresql.org/pub/repos/yum/9.3/redhat/rhel-6-x86_64/pgdg-centos93-9.3-2.noarch.rpm
yum install postgresql93 postgresql93-server postgresql93-libs postgresql93-contrib postgresql93-devel
配置文件 /etc/init.d/postgresql-9.3
PGDATA=/var/lib/pgsql/9.3/data
配置文件 /var/lib/pgsql/9.3/data/postgresql.conf
listen_addresses = '*'
配置文件 /var/lib/pgsql/9.3/data/pg_hba.conf
host all all 0.0.0.0/0 md5
初始化 service postgresql-9.3 initdb
启动 service postgresql-9.3 start
开机自启动 chkconfig postgresql-9.3 on
修改postgres密码
#su postgres
$psql -p 5432
$alter user postgres with password 'postgres'
$\q
$\exit
service postgresql-9.3 restart
service postgresql-9.3 reload