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

 找回密码
 注册

QQ登录

只需一步,快速开始

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

oracle linux 10.1上 使用源码方式安装 pgbackrest 2.57.0

[复制链接]
跳转到指定楼层
楼主
发表于 2026-1-2 15:56:01 | 只看该作者 回帖奖励 |正序浏览 |阅读模式
oracle linux 10.1上 使用源码方式安装 pgbackrest 2.57.0


由于我本机安装安装的pg18.1 ,pgbackrest从2.55.0开始支持pg18 ,同时,从2.55.0开始,pgbackrest源码安装去掉了 autoconf/make 构建流程,就是不再使用./configure方式去配置了,使用 Meson 方式去构建。
下面使用新的源码安装方式来进行说明

1.获取pgbackrest2.57.0 源码
  cd /pg18/soft

  1. wget https://github.com/pgbackrest/pgbackrest/archive/release/2.57.0.tar.gz
复制代码


2.释放到 /build
  mkdir -p /build
  tar xvf 2.57.0.tar.gz -C /build


3.启用 ol10_codeready_builder
  meson,libyaml-devel 在 codeready 仓库

  yum install yum-utils -y
  yum-config-manager --enable ol10_codeready_builder

4.启用 epel
  libssh2-devel,libssh2 在 epel


  1. rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm
复制代码


5.安装依赖


   yum install meson gcc postgresql-devel openssl-devel \
       libxml2-devel lz4-devel libzstd-devel bzip2-devel libyaml-devel libssh2-devel

6.Configure and compile pgBackRest
  meson setup /build/pgbackrest /build/pgbackrest-release-2.57.0
  ninja -C /build/pgbackrest


  root@pg181:/pg18/soft# meson setup /build/pgbackrest /build/pgbackrest-release-2.57.0
The Meson build system
Version: 1.4.1
Source dir: /build/pgbackrest-release-2.57.0
Build dir: /build/pgbackrest
Build type: native build
Project name: pgbackrest
Project version: 2.57.0
C compiler for the host machine: cc (gcc 14.3.1 "cc (GCC) 14.3.1 20250617 (Red Hat 14.3.1-2)")
C linker for the host machine: cc ld.bfd 2.41-45
Host machine cpu family: x86_64
Host machine cpu: x86_64
Compiler for C supports arguments -Wcast-qual: YES
Compiler for C supports arguments -Wconversion: YES
Compiler for C supports arguments -Wduplicated-cond: YES
Compiler for C supports arguments -Wduplicated-branches: YES
Compiler for C supports arguments --Wfloat-equal: NO
Compiler for C supports arguments -Wformat=2: YES
Compiler for C supports arguments -Wformat-overflow=2: YES
Compiler for C supports arguments -Wformat-signedness: YES
Compiler for C supports arguments -Winit-self: YES
Compiler for C supports arguments -Wmissing-prototypes: YES
Compiler for C supports arguments -Wmissing-variable-declarations: YES
Compiler for C supports arguments -Wpointer-arith: YES
Compiler for C supports arguments -Wredundant-decls: YES
Compiler for C supports arguments -Wstrict-prototypes: YES
Compiler for C supports arguments -Wvla: YES
Compiler for C supports arguments -Wwrite-strings: YES
Compiler for C supports arguments -Wno-clobbered: YES
Compiler for C supports arguments -Wno-missing-field-initializers: YES
Compiler for C supports arguments -funroll-loops: YES
Compiler for C supports arguments -ftree-vectorize: YES
Program python3 found: YES (/usr/bin/python3)
Compiler for C supports arguments -fmacro-prefix-map=../pgbackrest-release-2.57.0/src/=: YES
Compiler for C supports arguments -fmacro-prefix-map=../pgbackrest-release-2.57.0/test/src/=test/: YES
Library backtrace found: NO
Library bz2 found: YES
Found pkg-config: YES (/usr/bin/pkg-config) 2.1.0
Run-time dependency liblz4 found: YES 1.9.4
Run-time dependency openssl found: YES 3.5.1
Run-time dependency libpq found: YES 16.10
Run-time dependency libxml-2.0 found: YES 2.12.5
Run-time dependency yaml-0.1 found: YES 0.2.5
Run-time dependency zlib found: YES 1.3.1.zlib-ng
Run-time dependency libssh2 found: YES 1.11.1
Run-time dependency libzstd found: YES 1.5.5
Configuring build.auto.h using configuration
Configuring build.auto.h using configuration
Configuring build.auto.h using configuration
Build targets in project: 10

Found ninja-1.11.1 at /usr/bin/ninja

root@pg181:/pg18/soft# ninja -C /build/pgbackrest
ninja: Entering directory `/build/pgbackrest'
[251/251] Linking target src/pgbackrest



7.Copy pgBackRest binary from build host
  cp /build/pgbackrest/src/pgbackrest /usr/bin
  chmod 755 /usr/bin/pgbackrest


8.验证
  su - postgres
  pgbackrest

  postgres@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.






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

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-4-18 03:00 , Processed in 0.205405 second(s), 21 queries .

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

© 2001-2020

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