欢迎投稿

今日深度:

CentOS下安装postgresql,centospostgresql

CentOS下安装postgresql,centospostgresql


一、说明


postgresql版本:9.4.1

安装包:

postgresql94-server-9.4.1-1PGDG.rhel6.x86_64.rpm

postgresql94-libs-9.4.1-1PGDG.rhel6.x86_64.rpm

postgresql94-contrib-9.4.1-1PGDG.rhel6.x86_64.rpm

postgresql94-9.4.1-1PGDG.rhel6.x86_64.rpm

二、执行安装


 

1、安装PostgreSQL,注意安装顺序

 rpm -ivh postgresql94-libs-9.4.1-1PGDG.rhel6.x86_64.rpm

rpm -ivh postgresql94-9.4.1-1PGDG.rhel6.x86_64.rpm

rpm -ivh postgresql94-server-9.4.1-1PGDG.rhel6.x86_64.rpm

rpm -ivh postgresql94-contrib-9.4.1-1PGDG.rhel6.x86_64.rpm

如果安装报错,执行

yum install -y openssl

2、初始化数据库

service postgresql-9.4 initdb

3、启动服务

service postgresql-9.4 start

4、把PostgreSQL 服务加入到启动列表

chkconfig  postgresql-9.4 on

chkconfig --list|grep postgres

5、修改PostgreSQL 数据库用户postgres的密码(注意不是linux系统帐号)

#su - postgres

$ psql

# ALTER USER postgres WITH PASSWORD 'postgres'; 
# select * from pg_shadow ;

6、修改PostgresSQL 数据库配置实现远程访问

 

www.htsjk.Com true http://www.htsjk.com/postgresSQL/10424.html NewsArticle CentOS下安装postgresql,centospostgresql 一、说明 postgresql版本:9.4.1 安装包: postgresql94-server-9.4.1-1PGDG.rhel6.x86_64.rpm postgresql94-libs-9.4.1-1PGDG.rhel6.x86_64.rpm postgresql94-contrib-9.4.1-1PGDG.rhel6.x86_64.rp...
相关文章
    暂无相关文章
评论暂时关闭