重庆思庄Oracle、KingBase、PostgreSQL、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 273|回复: 0
打印 上一主题 下一主题

oracle linux 10.1上 使用rpm包方式安装 pgbackrest 2.57.0

[复制链接]
跳转到指定楼层
楼主
发表于 2026-1-2 14:11:26 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 郑全 于 2026-1-2 14:13 编辑

由于 oracle linux 10.1 版本比较新,pg数据库又是 18.1 ,pgbackrest从2.55.0开始支持pg18,因此,要安装 pgbackrest,
只能使用pgbackrest2.55.0以后的版本。

正好 pgbackrest2.57.0,在pg yum源上提供了这个已经打包好的rpm包,下面以这个方式说明安装步骤


1.安装依赖
  pgbackrest需要依赖 postgresql-libs 和  libssh2,因此,需要先安装,否则,直接安装pgbackrest会报错:
  root@pg181:~# rpm -ivh pgbackrest-2.57.0-4PGDG.rhel10.x86_64.rpm
warning: pgbackrest-2.57.0-4PGDG.rhel10.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 08b40d20: NOKEY
error: Failed dependencies:
        libpq.so.5()(64bit) is needed by pgbackrest-2.57.0-4PGDG.rhel10.x86_64
        libssh2 is needed by pgbackrest-2.57.0-4PGDG.rhel10.x86_64
        libssh2.so.1()(64bit) is needed by pgbackrest-2.57.0-4PGDG.rhel10.x86_64
        postgresql-libs is needed by pgbackrest-2.57.0-4PGDG.rhel10.x86_64

  1.1 安装 postgresql-libs
  这个操作系统yum源自动提供了这个包,直接使用yum安装即可

  yum install postgresql-libs


  1.2 安装 libssh2
  ORACLE LINUX yum源中默认没有这个包,需要从rhel单独下载

  官方镜像地址:https://pkgs.org/download/libssh2
  选择 libssh2-x.x.x-x.rhel10.x86_64.rpm 版本(匹配对应的系统架构)

  wget https://dl.fedoraproject.org/pub ... 1.el10_1.x86_64.rpm
  rpm -ivh libssh2-1.11.1-1.el10_1.x86_64.rpm
2.安装 pgbackrest
  2.1 下载对应的RPM包
    从 https://yum.postgresql.org/ 下载 pgbackrest rpm 包
    https://download.postgresql.org/ ... G.rhel10.x86_64.rpm

  2.2 安装
    rpm -ivh pgbackrest-2.57.0-4PGDG.rhel10.x86_64.rpm

3.验证

root@pg181:~# pgbackrest
pgBackRest 2.57.0 - General help

Usage:
    pgbackrest [options] [command]

Commands:
    annotate        add or modify backup annotation
    archive-get     get a WAL segment from the archive
    archive-push    push a WAL segment to the archive
    backup          backup a database cluster
    check           check the configuration
    expire          expire backups that exceed retention
    help            get help
    info            retrieve information about backups
    repo-get        get a file from a repository
    repo-ls         list files in a repository
    restore         restore a database cluster
    server          pgBackRest server
    server-ping     ping pgBackRest server
    stanza-create   create the required stanza data
    stanza-delete   delete a stanza
    stanza-upgrade  upgrade a stanza
    start           allow pgBackRest processes to run
    stop            stop pgBackRest processes from running
    verify          verify contents of a repository
    version         get version

Use 'pgbackrest help [command]' for more information.

对此,pgbackrest 安装好了。



分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2026-4-17 21:18 , Processed in 0.198927 second(s), 21 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表