一、首先去官网下载相关的安装包

https://yum.postgresql.org/rpmchart.php

二、下载安装包

1. 最小的数据库服务器安装包:

postgresql96-9.6.-1PGDG.rhel7.x86_64.rpm
postgresql96-libs-9.6.-1PGDG.rhel7.x86_64.rpm
postgresql96-server-9.6.-1PGDG.rhel7.x86_64.rpm

2. 扩展的一个rpm包:

(可以根据你的需求自主选择扩展下载包)

postgresql96-devel-9.6.5-1PGDG.rhel7.x86_64.rpm

三、安装顺序如下:

. rpm -ivh postgresql96-libs-9.6.-1PGDG.rhel7.x86_64.rpm
. rpm -ivh postgresql96-9.6.-1PGDG.rhel7.x86_64.rpm
. rpm -ivh postgresql96-server-9.6.-1PGDG.rhel7.x86_64.rpm
. rpm -ivh postgresql96-devel-9.6.-1PGDG.rhel7.x86_64.rpm

四、启动测试

1. 首先必须初始化数据库

/usr/pgsql-9.6/bin/postgresql96-setup initdb

2. 运行

systemctl start postgresql-9.6

3. 添加开机启动

systemctl enable postgresql-9.6

rpm安装PostgreSQL的更多相关文章

  1. Centos7 yum安装postgresql 9.5

    添加RPM yum install https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-7-x86_64/pgdg-centos ...

  2. Linux CentOS安装postgresql 9.4

    一.前言 PostgreSQL通常也简称Postgres,是一个关系型数据库管理系统,适用于各种Linux操作系统.Windows.Solaris.BSD和Mac OS X.PostgreSQL遵循P ...

  3. CentOS6.5下安装PostgreSQL

    一.配置 YUM 仓库 修改原始的 yum 仓库配置: vim /etc/yum.repos.d/CentOS-Base.repo 在[base]和[updates] 节(section)部分的尾部插 ...

  4. centos 6.4下安装postgresql 9.2

    我的linux版本是centos 6.4 ,准备安装postgresql 9.2 根据官方说明: http://www.postgresql.org/download/linux/redhat/ 缺省 ...

  5. 安装postgreSQL出现configure:error:readline library not found解决方法

    要安装 readline , readline-dev 开发包,要么使用 --without-readline 选项关闭 readline 功能. #yum install readline; #yu ...

  6. 在CentOS上编译安装PostgreSQL

    http://my.oschina.net/tashi/blog 第一步:准备阶段 获取必需软件包: CentOS中查看是否安装了某个软件的命令:rpm -qa | grep 软件名.which命令可 ...

  7. CentOS下安装postgresql

    一.说明 postgresql版本:9.4.1 安装包: postgresql94-server-9.4.1-1PGDG.rhel6.x86_64.rpm postgresql94-libs-9.4. ...

  8. CentOS安装postgresql 9.4

    第一步:在CentOS6.5下安装Postgresql 1. 安装PostgreSQL源 # yum install http://yum.postgresql.org/9.4/redhat/rhel ...

  9. CentOS 6.9下安装PostgreSQL

    操作系统:CentOS6.9_x64 PostgreSQL官方网址: https://www.postgresql.org/ 安装数据库 使用如下命令: yum install postgresql- ...

随机推荐

  1. 协定须要双工,可是绑定“WSHttpBinding”不支持它或者因配置不对而无法支持它

    协定须要双工,可是绑定"WSHttpBinding"不支持它或者因配置不对而无法支持它 下面两种情况,我都遇到过. 一, < endpoint address =" ...

  2. Systemd 三部曲 之 PHP7

    安装编译php7时需要的依赖包 : yum -y install libxml2 libxml2-devel openssl openssl-devel curl-devel libjpeg-deve ...

  3. 【Python】得到当前日期时间

    import time str=time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(time.time())) print(str)

  4. Linux:编译动态库时遇到的错误relocation R_X86_64_32 against `a local symbol'

    编译动态库时遇到如下错误: ... ... relocation R_X86_64_32 against `a local symbol' can not be used when making a ...

  5. 转:C#委托与事件

    委托与事件    Ganesh Nataraj最近写了一篇解释委托与事件的文章,在坊间流传较广,今天翻译成中文与大家共享,如有不妥之处,欢迎留言讨论.    C#中的委托类似于C或C++中的函数指针. ...

  6. Hibernate学习笔记(十) — HQL查询

    一.HQL的一对多查询 班级(1)->(多)学生 /** * 实现Classes与Student的内连接 * * SELECT c.*,s.* * from classes c INNER JO ...

  7. Hat’s Words(字典树)

    Problem Description A hat's word is a word in the dictionary that is the concatenation of exactly tw ...

  8. ORA-01109:数据库未打开(解决)

    SQL> startup mountORA-01081: 无法启动已在运行的 ORACLE - 请首先关闭它SQL> shutdown immediateORA-01109: 数据库未打开 ...

  9. repr

    >>> import datetime >>> today=datetime.datetime.now() >>> today datetime. ...

  10. (二)Linux实操之——网络配置、进程管理、服务管理、组管理、YUM

    接上段   (一)Linux实操之——权限.任务调度.磁盘分区 4.网络配置 4.1 NAT模式的网络配置 目前我们采用的网络配置是NAT模式. windows下cmd通过 ipconfig 命令可以 ...