[转帖]centos7离线安装postgresql13
https://www.cnblogs.com/summer-88/p/15341918.html
- 在一台可以联网的centos上安装postgresql源
yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
- 使用yumdownloader下载安装包
yumdownloader --resolve postgresql13-server
- 上传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
- 批量安装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
- 使用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
- 安装成功后初始化数据库
/usr/pgsql-13/bin/postgresql-13-setup initdb
- 开机启动postgresql数据库
systemctl enable postgresql-13
- 启动postgresql数据库服务
systemctl start postgresql-13
- 创建用户和数据库,使用postgres用户登录(PostgresSQL安装后会自动创建postgres用户,无密码)
su postgres
- 登录postgresql数据库
psql
- 创建用户和数据库并授权
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 的注释,将参数值改为“*”
- 修改/var/lib/pgsql/13/data/pg_hba.conf文件,增加下图红框部分内容

- 切换到root用户,重启postgresql服务
systemctl restart postgresql-13
[转帖]centos7离线安装postgresql13的更多相关文章
- CentOS7离线安装mysql5.7
下载mysql5.7,系统选择redhat,版本选择RHEL7,下载RPM Bundle后得到一个tar文件.这里得到文件mysql-5.7.25-1.el7.x86_64.rpm-bundle.ta ...
- CentOS7 离线安装mysql-5.7.16
CentOS7 离线安装mysql-5.7.16 1 . 安装新版mysql前,需将系统自带的mariadb-lib卸载 [root@slave mytmp]# rpm -qa|grep mariad ...
- CentOS7离线安装Nginx(详细安装过程)
CentOS7离线安装Nginx(详细安装过程) 1.安装gcc.g++ 下载好所需的文件后上传至服务器(下载地址:https://download.csdn.net/download/a729360 ...
- CentOS7离线安装MySQL8.0
CentOS7离线安装MySQL8.0 卸载软件 rpm -e --nodeps 要卸载的软件包 root@jacky zookeeper]# rpm -e --nodeps java-1.6.0-o ...
- Binlog2sql+CentOS7 离线安装
Binlog2sql+CentOS7 离线安装 目录 Binlog2sql+CentOS7 离线安装 1. 环境 2. 下载 3.1 Pip 安装 3.2 PyMySQL/mysql-replicat ...
- Centos7 离线安装 php7
问题:因内部管控,机器无法连接公有yum源安装php. 正常安装php7可以参考CentOS7.2 安装 PHP7.2 下面的代码也是一种方法 yum -y install libmcrypt lib ...
- Ambari2.7.4+HDP3.1.4安装 Centos7离线安装
一. Ambari等简单介绍 1.1Ambari Ambari是一种基于Web的工具,支持Apache Hadoop集群的创建 .管理和监控. Ambari已支持大多数Hadoop组件,包括HDFS. ...
- centos7离线安装PHP7
环境 centos7.9 PHP7.4.30 准备工作 在编译PHP时会提示一些包版本不够或者缺少某些包,一般选择yum来安装缺少的包,但因为是离线安装,所以可以手动配置本地yum源.先看一下系统版本 ...
- [转帖]Centos7 yum安装Chrome浏览器
Centos7 yum安装Chrome浏览器 https://www.cnblogs.com/ianduin/p/8727333.html以及https://blog.csdn.net/libaine ...
- centos7离线安装rpm包自动解决依赖
离线安装rpm包自动解决依赖参照https://blog.csdn.net/u011396718/article/details/80153515当生产环境由于安全原因处于断网状态的时候.通过本地源的 ...
随机推荐
- JPA复杂查询时间查询分页排序
JPA复杂查询时间查询分页排序 JPA复杂查询时间查询分页排序,工作上用到,因为项目是jpa,记录.代码囊括了:查询条件+时间范围+分页+排序 其实我也不太想用jpa,但是他也有优点,操作可以兼容多种 ...
- 快速批量升级 NugetPackage 版本
批量升级项目中的 Nuget 有时候我们需要升级整个解决方案中的某些Nuget版本,如果每个手动使用NuGet Package Manager 会很麻烦.经过一个周末的踩坑,我找到一个解决方案. Na ...
- OSG嵌入QT的简明总结2
正文 我之前在这篇博文<OSG嵌入QT的简明总结>中论述了OSG在QT中显示的可视化问题.其中提到官方提供的osgQt项目(地址:https://github.com/opensceneg ...
- Mysql开发实践:error while loading shared libraries: libaio解决方案
摘要:Mysql出现问题:error while loading shared libraries: libaio解决方案. 本文分享自华为云社区<Mysql出现问题:error while l ...
- hystrix.stream dashboard
9001 POM.XML <?xml version="1.0" encoding="UTF-8"?> <project xmlns=&quo ...
- selenium 访问无等待
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities desired_capabilities ...
- 【短道速滑二】古老的基于亮度平均值的自动Gamma校正算法。
在github上搜索代码Auto Gamma Correction,找到一个比较古老的代码,详见:https://github.com/PedramBabakhani/Automatic-Gamma- ...
- c#-微软
1)使用c#编写第一个程序简介: c#编程语言允许你构建多种类型的应用程序,例如: 用于捕获,分析和处理数据的业务应用程序 可从Web浏览器访问的动态Web应用程序 2D和3D游戏 金融和科研应用程序 ...
- echart问题集合
legend与图标间隔 echarts自定义tooltip提示框内容 https://blog.csdn.net/dreamsup/article/details/56667330 echarts中自 ...
- v-cloak指令用法
插值表达式存在的问题:'闪动' 如何解决该问题:使用v-cloak指令 解决该问题的原理:先隐藏,替换好值之后再显示最终的值 背后的原理:先通过样式隐藏内容,然后在内存中进行值得替换,替换好之后再显示 ...