https://www.cnblogs.com/summer-88/p/15341918.html
  1. 在一台可以联网的centos上安装postgresql源
yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
  1. 使用yumdownloader下载安装包
yumdownloader --resolve postgresql13-server
  1. 上传rpm包到安装的centos服务器上
-rw-rw-rw- 1 root root 1490812 Sep 27 09:45 postgresql13-13.4-1PGDG.rhel7.x86_64.rpm
-rw-rw-rw- 1 root root 390420 Sep 27 09:45 postgresql13-libs-13.4-1PGDG.rhel7.x86_64.rpm
-rw-rw-rw- 1 root root 5654980 Sep 27 09:45 postgresql13-server-13.4-1PGDG.rhel7.x86_64.rpm
  1. 批量安装rpm包
rpm -ivh postgresql13-13.4-1PGDG.rhel7.x86_64.rpm postgresql13-libs-13.4-1PGDG.rhel7.x86_64.rpm postgresql13-server-13.4-1PGDG.rhel7.x86_64.rpm

报错了,缺少依赖libicu

warning: postgresql13-13.4-1PGDG.rhel7.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 442df0f8: NOKEY
error: Failed dependencies:
libicu is needed by postgresql13-13.4-1PGDG.rhel7.x86_64
libicui18n.so.50()(64bit) is needed by postgresql13-server-13.4-1PGDG.rhel7.x86_64
libicuuc.so.50()(64bit) is needed by postgresql13-server-13.4-1PGDG.rhel7.x86_64
  1. 使用yumdownloader下载libicu
yumdownloader --resolve libicu
-rw-r--r-- 1 root root 7250656 Mar 25  2020 libicu-50.2-4.el7_7.i686.rpm
-rw-r--r-- 1 root root 7202728 Mar 25 2020 libicu-50.2-4.el7_7.x86_64.rpm
-rw-r--r-- 1 root root 1490812 Aug 12 18:07 postgresql13-13.4-1PGDG.rhel7.x86_64.rpm
-rw-r--r-- 1 root root 390420 Aug 12 18:07 postgresql13-libs-13.4-1PGDG.rhel7.x86_64.rpm
-rw-r--r-- 1 root root 5654980 Aug 12 18:07 postgresql13-server-13.4-1PGDG.rhel7.x86_64.rpm

删除libicu-50.2-4.el7_7.i686.rpm(32位安装包)
6. 重新上传到需要安装的服务器,执行安装命令

rpm -ivh libicu-50.2-4.el7_7.x86_64.rpm postgresql13-13.4-1PGDG.rhel7.x86_64.rpm postgresql13-libs-13.4-1PGDG.rhel7.x86_64.rpm postgresql13-server-13.4-1PGDG.rhel7.x86_64.rpm
  1. 安装成功后初始化数据库
/usr/pgsql-13/bin/postgresql-13-setup initdb
  1. 开机启动postgresql数据库
systemctl enable postgresql-13
  1. 启动postgresql数据库服务
systemctl start postgresql-13
  1. 创建用户和数据库,使用postgres用户登录(PostgresSQL安装后会自动创建postgres用户,无密码)
su postgres
  1. 登录postgresql数据库
psql
  1. 创建用户和数据库并授权
create user ycloans with password 'ycloans';            // 创建用户
create database sonarqube owner ycloans; // 创建数据库
grant all privileges on database sonarqube to ycloans; // 授权

\q 退出命令模式
13. 开启远程访问,修改/var/lib/pgsql/13/data/postgresql.conf文件,取消 listen_addresses 的注释,将参数值改为“*”

  1. 修改/var/lib/pgsql/13/data/pg_hba.conf文件,增加下图红框部分内容
  2. 切换到root用户,重启postgresql服务
systemctl restart postgresql-13

[转帖]centos7离线安装postgresql13的更多相关文章

  1. CentOS7离线安装mysql5.7

    下载mysql5.7,系统选择redhat,版本选择RHEL7,下载RPM Bundle后得到一个tar文件.这里得到文件mysql-5.7.25-1.el7.x86_64.rpm-bundle.ta ...

  2. CentOS7 离线安装mysql-5.7.16

    CentOS7 离线安装mysql-5.7.16 1 . 安装新版mysql前,需将系统自带的mariadb-lib卸载 [root@slave mytmp]# rpm -qa|grep mariad ...

  3. CentOS7离线安装Nginx(详细安装过程)

    CentOS7离线安装Nginx(详细安装过程) 1.安装gcc.g++ 下载好所需的文件后上传至服务器(下载地址:https://download.csdn.net/download/a729360 ...

  4. CentOS7离线安装MySQL8.0

    CentOS7离线安装MySQL8.0 卸载软件 rpm -e --nodeps 要卸载的软件包 root@jacky zookeeper]# rpm -e --nodeps java-1.6.0-o ...

  5. Binlog2sql+CentOS7 离线安装

    Binlog2sql+CentOS7 离线安装 目录 Binlog2sql+CentOS7 离线安装 1. 环境 2. 下载 3.1 Pip 安装 3.2 PyMySQL/mysql-replicat ...

  6. Centos7 离线安装 php7

    问题:因内部管控,机器无法连接公有yum源安装php. 正常安装php7可以参考CentOS7.2 安装 PHP7.2 下面的代码也是一种方法 yum -y install libmcrypt lib ...

  7. Ambari2.7.4+HDP3.1.4安装 Centos7离线安装

    一. Ambari等简单介绍 1.1Ambari Ambari是一种基于Web的工具,支持Apache Hadoop集群的创建 .管理和监控. Ambari已支持大多数Hadoop组件,包括HDFS. ...

  8. centos7离线安装PHP7

    环境 centos7.9 PHP7.4.30 准备工作 在编译PHP时会提示一些包版本不够或者缺少某些包,一般选择yum来安装缺少的包,但因为是离线安装,所以可以手动配置本地yum源.先看一下系统版本 ...

  9. [转帖]Centos7 yum安装Chrome浏览器

    Centos7 yum安装Chrome浏览器 https://www.cnblogs.com/ianduin/p/8727333.html以及https://blog.csdn.net/libaine ...

  10. centos7离线安装rpm包自动解决依赖

    离线安装rpm包自动解决依赖参照https://blog.csdn.net/u011396718/article/details/80153515当生产环境由于安全原因处于断网状态的时候.通过本地源的 ...

随机推荐

  1. rust angular 自签名证书 wss

    项目中采用 wss 来建立的前后端连接, 但是并没有用到认证的证书, 所以自己用 openssl 生成了私钥, 自签名证书来使用: 这里就不再赘述 Wss 连接过程, 直接上手操作: 1. 生成私钥, ...

  2. 谈谈muduo库的销毁连接对象——C++程序内存管理和线程安全的极致体现

    前言 网络编程的连接断开一向比连接建立复杂的多,这一点在陈硕写的muduo库中体现的淋漓尽致,同时也充分体现了C++程序在对象生命周期管理上的复杂性,稍有不慎,满盘皆输. 为了纪念自己啃下muduo库 ...

  3. IO流小结图片

  4. DWS临时内存不可用报错: memory temporarily unavailable

    本文分享自华为云社区<DWS临时内存不可用报错: memory temporarily unavailable>,作者:漫天. 1.定位报错的DN/CN 当出现memory tempora ...

  5. 云小课|MRS基础操作之集群健康检查

    本文分享自华为云社区<云小课|MRS基础操作之集群健康检查>,作者:阅识风云. 阅识风云是华为云信息大咖,擅长将复杂信息多元化呈现,其出品的一张图(云图说).深入浅出的博文(云小课)或短视 ...

  6. 人人都在聊的云原生数据库Serverless到底是什么?

    摘要:华为云数据库营销专家Tony Chen和华为云数据库高级产品经理佳恩开展了一场关于云原生数据库与Serverless结合的直播对话. 云计算的迅猛发展推动了数据库的变革,云原生数据库成为当前数据 ...

  7. 云原生开发者须具备的1+N技能,开启第二曲线

    摘要:云的大环境下,意味以云为中心的快速应用开发能力将成为"胜负手".在现如今如此复杂的外部环境,且高速发展的情况下,为了不重蹈覆辙,必须需要开发者的第二曲线来破局! 随着云计算的 ...

  8. 小白必看!JS中循环语句大集合

    摘要:JavaScript中,一共给开发者提供了一下几种循环语句,分别是while循环,do-while循环,for循环,for Each,for-in循环和for-of循环. 本文分享自华为云社区& ...

  9. THOR:MindSpore 自研高阶优化器源码分析和实践应用

    摘要:这篇文章跟大家分享下THOR的实践应用.THOR算法的部分内容当前已经在MindSpore中开源 本文分享自华为云社区<MindSpore 自研高阶优化器源码分析和实践应用>,原文作 ...

  10. POJ 1742 Coins(多重背包的可行性问题)

    Description People in Silverland use coins.They have coins of value A1,A2,A3...An Silverland dollar. ...