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

标题: oracle linux 10.1上 使用rpm包方式安装 pgbackrest 2.57.0 [打印本页]

作者: 郑全    时间: 2026-1-2 14:11
标题: oracle linux 10.1上 使用rpm包方式安装 pgbackrest 2.57.0
本帖最后由 郑全 于 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 安装好了。








欢迎光临 重庆思庄Oracle、KingBase、PostgreSQL、Redhat认证学习论坛 (http://bbs.cqsztech.com/) Powered by Discuz! X3.2