postgresql-9.3安装

前端之家收集整理的这篇文章主要介绍了postgresql-9.3安装前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

1.获取安装源

yum install http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-redhat93-9.3-1.noarch.rpm

2.安装

postgresql93 postgresql93-server postgresql93-contrib postgresql93-plpython postgresql93-libs postgresql93-devel

3.修改数据目录为/data/pgdata

vim /var/lib/pgsql/.bash_profile

改为以下内容

[ -f /etc/profile ] && source /etc/profile

PGDATA=/data/pgdata
export PGDATA

vim /etc/init.d/postgresql-9.3

把PGDATA一行改为:PGDATA=/data/pgdata

mkdir/data/pgdata

chown -Rpostgres:/data/pgdata

chmod 700/data/pgdata

4.初始化数据目录

service postgresql-9.3 initdb

5.加入服务

chkconfig postgresql-9.3 on

6.启动服务

service postgresql-9.3 start


配置参数包含在以下两个文件内:

/data/pgdata/postgresql.conf

/data/pgdata/pg_hba.conf

原文链接:https://www.f2er.com/postgresql/195542.html

猜你在找的Postgre SQL相关文章