码迷,mamicode.com
首页 > 数据库 > 详细

Postgres SQL在线安装

时间:2017-03-07 13:18:23      阅读:223      评论:0      收藏:0      [点我收藏+]

标签:service   conf   配置环境   sys   exp   code   yum   在线   环境   

背景:CentOS 7

一、在线yum安装

1 yum -y install https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-7-x86_64/pgdg-centos95-9.5-2.noarch.rpm
2 yum -y install postgresql95-server stgresql95-odbc postgresql95-devel

二、初始化数据库

/usr/pgsql-9.5/bin/postgresql95-setup initdb

三、配置环境变量

1 export PKG_CONFIG_PATH=/usr/pgsql-9.5/lib/pkgconfig
2 export PATH=/usr/pgsql-9.5/bin:$PATH

四、添加开机启动

systemctl enable postgresql-9.5.service

五、启动服务

systemctl start postgresql-9.5.service

Postgres SQL在线安装

标签:service   conf   配置环境   sys   exp   code   yum   在线   环境   

原文地址:http://www.cnblogs.com/yoyotl/p/6514074.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!