coffee_cn

博客园 首页 新随笔 联系 订阅 管理

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

posted on 2017-02-06 16:49  coffee  阅读(245)  评论(0编辑  收藏  举报