三、postgresql-14+repmgr-5.3.3高可用安装配置
source link: https://blog.51cto.com/u_10930585/5805207
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
3、解压编译
[pg14@cdh01 ~]$ cd repmgr-5.3.3
[pg14@cdh01 repmgr-5.3.3]$ ./configure
checking for a sed that does not truncate output... /bin/sed
checking for pg_config... /home/pg14/soft/bin/pg_config
configure: building against PostgreSQL 14.5
checking for gnused... no
checking for gsed... no
checking for sed... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating Makefile.global
config.status: creating config.h
[pg14@cdh01 repmgr-5.3.3]$ make install
Building against PostgreSQL 14
gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -std=gnu89 -I/home/pg14/soft/include/postgresql/internal -I/home/pg14/soft/include -Wall -Wmissing-prototypes -Wmissing-declarations -I. -I./ -I/home/pg14/soft/include/postgresql/server -I/home/pg14/soft/include/postgresql/internal -D_GNU_SOURCE -c -o repmgr.o repmgr.c
gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -shared -o repmgr.so repmgr.o -L/home/pg14/soft/lib -Wl,--as-needed -Wl,-rpath,'/home/pg14/soft/lib',--enable-new-dtags -L/home/pg14/soft/lib -lpq
sed -E 's/REPMGR_VERSION_DATE.*""/REPMGR_VERSION_DATE "2022-10-26"/' repmgr_version.h.in >repmgr_version.h; \
sed -i -E 's/PG_ACTUAL_VERSION_NUM/PG_ACTUAL_VERSION_NUM 140005/' repmgr_version.h
gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -std=gnu89 -I/home/pg14/soft/include/postgresql/internal -I/home/pg14/soft/include -Wall -Wmissing-prototypes -Wmissing-declarations -I. -I./ -I/home/pg14/soft/include/postgresql/server -I/home/pg14/soft/include/postgresql/internal -D_GNU_SOURCE -c -o repmgr-client.o repmgr-client.c
gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -std=gnu89 -I/home/pg14/soft/include/postgresql/internal -I/home/pg14/soft/include -Wall -Wmissing-prototypes -Wmissing-declarations -I. -I./ -I/home/pg14/soft/include/postgresql/server -I/home/pg14/soft/include/postgresql/internal -D_GNU_SOURCE -c -o repmgr-action-primary.o repmgr-action-primary.c
gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -std=gnu89 -I/home/pg14/soft/include/postgresql/internal -I/home/pg14/soft/include -Wall -Wmissing-prototypes -Wmissing-declarations -I. -I./ -I/home/pg14/soft/include/postgresql/server -I/home/pg14/soft/include/postgresql/internal -D_GNU_SOURCE -c -o repmgr-action-standby.o repmgr-action-standby.c
gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -std=gnu89 -I/home/pg14/soft/include/postgresql/internal -I/home/pg14/soft/include -Wall -Wmissing-prototypes -Wmissing-declarations -I. -I./ -I/home/pg14/soft/include/postgresql/server -I/home/pg14/soft/include/postgresql/internal -D_GNU_SOURCE -c -o repmgr-action-witness.o repmgr-action-witness.c
gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -std=gnu89 -I/home/pg14/soft/include/postgresql/internal -I/home/pg14/soft/include -Wall -Wmissing-prototypes -Wmissing-declarations -I. -I./ -I/home/pg14/soft/include/postgresql/server -I/home/pg14/soft/include/postgresql/internal -D_GNU_SOURCE -c -o repmgr-action-cluster.o repmgr-action-cluster.c
gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -std=gnu89 -I/home/pg14/soft/include/postgresql/internal -I/home/pg14/soft/include -Wall -Wmissing-prototypes -Wmissing-declarations -I. -I./ -I/home/pg14/soft/include/postgresql/server -I/home/pg14/soft/include/postgresql/internal -D_GNU_SOURCE -c -o repmgr-action-node.o repmgr-action-node.c
gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -std=gnu89 -I/home/pg14/soft/include/postgresql/internal -I/home/pg14/soft/include -Wall -Wmissing-prototypes -Wmissing-declarations -I. -I./ -I/home/pg14/soft/include/postgresql/server -I/home/pg14/soft/include/postgresql/internal -D_GNU_SOURCE -c -o repmgr-action-service.o repmgr-action-service.c
gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -std=gnu89 -I/home/pg14/soft/include/postgresql/internal -I/home/pg14/soft/include -Wall -Wmissing-prototypes -Wmissing-declarations -I. -I./ -I/home/pg14/soft/include/postgresql/server -I/home/pg14/soft/include/postgresql/internal -D_GNU_SOURCE -c -o repmgr-action-daemon.o repmgr-action-daemon.c
gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -std=gnu89 -I/home/pg14/soft/include/postgresql/internal -I/home/pg14/soft/include -Wall -Wmissing-prototypes -Wmissing-declarations -I. -I./ -I/home/pg14/soft/include/postgresql/server -I/home/pg14/soft/include/postgresql/internal -D_GNU_SOURCE -c -o configdata.o configdata.c
gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -std=gnu89 -I/home/pg14/soft/include/postgresql/internal -I/home/pg14/soft/include -Wall -Wmissing-prototypes -Wmissing-declarations -I. -I./ -I/home/pg14/soft/include/postgresql/server -I/home/pg14/soft/include/postgresql/internal -D_GNU_SOURCE -c -o configfile.o configfile.c
flex -o'configfile-scan.c' configfile-scan.l
gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -std=gnu89 -I/home/pg14/soft/include/postgresql/internal -I/home/pg14/soft/include -Wall -Wmissing-prototypes -Wmissing-declarations -I. -I./ -I/home/pg14/soft/include/postgresql/server -I/home/pg14/soft/include/postgresql/internal -D_GNU_SOURCE -c -o configfile-scan.o configfile-scan.c
gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -std=gnu89 -I/home/pg14/soft/include/postgresql/internal -I/home/pg14/soft/include -Wall -Wmissing-prototypes -Wmissing-declarations -I. -I./ -I/home/pg14/soft/include/postgresql/server -I/home/pg14/soft/include/postgresql/internal -D_GNU_SOURCE -c -o log.o log.c
gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -std=gnu89 -I/home/pg14/soft/include/postgresql/internal -I/home/pg14/soft/include -Wall -Wmissing-prototypes -Wmissing-declarations -I. -I./ -I/home/pg14/soft/include/postgresql/server -I/home/pg14/soft/include/postgresql/internal -D_GNU_SOURCE -c -o strutil.o strutil.c
gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -std=gnu89 -I/home/pg14/soft/include/postgresql/internal -I/home/pg14/soft/include -Wall -Wmissing-prototypes -Wmissing-declarations -I. -I./ -I/home/pg14/soft/include/postgresql/server -I/home/pg14/soft/include/postgresql/internal -D_GNU_SOURCE -c -o controldata.o controldata.c
gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -std=gnu89 -I/home/pg14/soft/include/postgresql/internal -I/home/pg14/soft/include -Wall -Wmissing-prototypes -Wmissing-declarations -I. -I./ -I/home/pg14/soft/include/postgresql/server -I/home/pg14/soft/include/postgresql/internal -D_GNU_SOURCE -c -o dirutil.o dirutil.c
gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -std=gnu89 -I/home/pg14/soft/include/postgresql/internal -I/home/pg14/soft/include -Wall -Wmissing-prototypes -Wmissing-declarations -I. -I./ -I/home/pg14/soft/include/postgresql/server -I/home/pg14/soft/include/postgresql/internal -D_GNU_SOURCE -c -o compat.o compat.c
gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -std=gnu89 -I/home/pg14/soft/include/postgresql/internal -I/home/pg14/soft/include -Wall -Wmissing-prototypes -Wmissing-declarations -I. -I./ -I/home/pg14/soft/include/postgresql/server -I/home/pg14/soft/include/postgresql/internal -D_GNU_SOURCE -c -o dbutils.o dbutils.c
gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -std=gnu89 -I/home/pg14/soft/include/postgresql/internal -I/home/pg14/soft/include -Wall -Wmissing-prototypes -Wmissing-declarations -I. -I./ -I/home/pg14/soft/include/postgresql/server -I/home/pg14/soft/include/postgresql/internal -D_GNU_SOURCE -c -o sysutils.o sysutils.c
gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC repmgr-client.o repmgr-action-primary.o repmgr-action-standby.o repmgr-action-witness.o repmgr-action-cluster.o repmgr-action-node.o repmgr-action-service.o repmgr-action-daemon.o configdata.o configfile.o configfile-scan.o log.o strutil.o controldata.o dirutil.o compat.o dbutils.o sysutils.o -L/home/pg14/soft/lib -lpgcommon -lpgport -L/home/pg14/soft/lib -lpq -L/home/pg14/soft/lib -Wl,--as-needed -Wl,-rpath,'/home/pg14/soft/lib',--enable-new-dtags -lpgcommon -lpgport -lssl -lcrypto -lz -lreadline -lpthread -lrt -ldl -lm -o repmgr
gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -std=gnu89 -I/home/pg14/soft/include/postgresql/internal -I/home/pg14/soft/include -Wall -Wmissing-prototypes -Wmissing-declarations -I. -I./ -I/home/pg14/soft/include/postgresql/server -I/home/pg14/soft/include/postgresql/internal -D_GNU_SOURCE -c -o repmgrd.o repmgrd.c
gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -std=gnu89 -I/home/pg14/soft/include/postgresql/internal -I/home/pg14/soft/include -Wall -Wmissing-prototypes -Wmissing-declarations -I. -I./ -I/home/pg14/soft/include/postgresql/server -I/home/pg14/soft/include/postgresql/internal -D_GNU_SOURCE -c -o repmgrd-physical.o repmgrd-physical.c
gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC repmgrd.o repmgrd-physical.o configdata.o configfile.o configfile-scan.o log.o dbutils.o strutil.o controldata.o compat.o sysutils.o -L/home/pg14/soft/lib -lpgcommon -lpgport -L/home/pg14/soft/lib -lpq -L/home/pg14/soft/lib -Wl,--as-needed -Wl,-rpath,'/home/pg14/soft/lib',--enable-new-dtags -lpgcommon -lpgport -lssl -lcrypto -lz -lreadline -lpthread -lrt -ldl -lm -o repmgrd
/bin/mkdir -p '/home/pg14/soft/lib/postgresql'
/bin/mkdir -p '/home/pg14/soft/share/postgresql/extension'
/bin/mkdir -p '/home/pg14/soft/share/postgresql/extension'
/bin/mkdir -p '/home/pg14/soft/bin'
/bin/install -c -m 755 repmgr.so '/home/pg14/soft/lib/postgresql/repmgr.so'
/bin/install -c -m 644 .//repmgr.control '/home/pg14/soft/share/postgresql/extension/'
/bin/install -c -m 644 .//repmgr--unpackaged--4.0.sql .//repmgr--unpackaged--5.1.sql .//repmgr--unpackaged--5.2.sql .//repmgr--unpackaged--5.3.sql .//repmgr--4.0.sql .//repmgr--4.0--4.1.sql .//repmgr--4.1.sql .//repmgr--4.1--4.2.sql .//repmgr--4.2.sql .//repmgr--4.2--4.3.sql .//repmgr--4.3.sql .//repmgr--4.3--4.4.sql .//repmgr--4.4.sql .//repmgr--4.4--5.0.sql .//repmgr--5.0.sql .//repmgr--5.0--5.1.sql .//repmgr--5.1.sql .//repmgr--5.1--5.2.sql .//repmgr--5.2.sql .//repmgr--5.2--5.3.sql .//repmgr--5.3.sql '/home/pg14/soft/share/postgresql/extension/'
/bin/install -c -m 755 repmgr repmgrd '/home/pg14/soft/bin/'
Recommend
-
18
1.准备Master:192.168.231.128BackUp:192.168.231.129两台主机都安装keepalived工具[root@test_01 ~]# yum install -y keepalived2.Master上配置①清空配置文件,将如下配置内容写入文件中/etc/keepalived/keepaliv...
-
50
本文讲的是如何在高可用集群中配置fence
-
11
redis安装和高可用配置,持久化,主从模式,哨兵模式,集群模式 发表于
-
1
postgresql12.4+repmgr 备库注册不上去 开源问答 ...
-
1
Ubuntu 18.04+Postgresql 10+Gerrit 2.15.19+nginx 1.14 安装配置指南要保证代码的高质量,那必须要进行同行评审代码检查,所有代码都必须经过 Review
-
6
linux postgresql 安装配置详解«海底苍鹰(tank)博客 一,什么是postgresql PostgreSQL是以加州大学伯克利分校计算机系开发的 POSTGRES 版本 4.2 为基础的对象关系型数据库管理系统(ORDBMS),简称pgsql,它支持大部分...
-
4
PostgreSQL 安装与配置 返回 安装依赖包 Centos yum install -y gcc readline readline-d...
-
8
Windows 环境搭建 PostgreSQL 逻辑复制高可用架构数据库服务 ...
-
4
Windows 环境搭建 PostgreSQL 物理复制高可用架构数据库服务 ...
-
5
因环境有限,本文在一台机器上实现基于Patroni的PostgreSQL高可用服务测试。1、安装软件包[root@lee ~]# yum -y install https://mirrors.tuna.tsinghua.edu.cn/postgresql/repos/yum/reporpms/EL-7-x86_64/pgdg...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK