2

三、postgresql-14+repmgr-5.3.3高可用安装配置

 1 year ago
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.
neoserver,ios ssh client

3、解压编译



[pg14@cdh01 ~]$ tar xf repmgr-5.3.3.tar.gz
[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

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK