暂无图片
暂无图片
2
暂无图片
暂无图片
暂无图片
龙蜥 8.6安装postgresSQL+repmgr和postgis-20251010.pdf
309
28页
10次
2025-10-10
10墨值下载
龙蜥 8.6安装postgresSQL+repmgr和postgis
一、安装环境
两台虚拟机实现 PostgresSQL + PostGIS 的一主一备冗余规划。
主机名
IP
用途
longxi01
192.168.207.69
初始主节点
longxi02
192.168.207.70
初始备节点
192.168.207.49
双机冗余时的浮动 IP
二、安装前准备工
1、系统环境配
!!! 以下操作如无特殊说明,均在两台主机上都要执行。
1 .1 HOSTS
1.2 SELINUX
1.3 LIMITS
cat>>/etc/hosts<<EOF
192.168.207.69 longxi01
192.168.207.70 longxi02
EOF
setenforce 0
sed -i "s/SELINUX=enforcing/SELINUX=disabled/" /etc/selinux/config
systemctl stop firewalld
systemctl disable firewalld
cat>>/etc/security/limits.conf<<EOF
postgres soft nofile 1048576
postgres hard nofile 1048576
postgres soft nproc 131072
postgres hard nproc 131072
postgres soft stack 10240
postgres hard stack 32768
龙蜥 8.6安装postgresSQL+repmgrpostgis
1 / 28
1.4
2、安装 PostgresSQL PostGIS依赖
!!! 以下操作如无特殊说明,均在两台主机上都要执行。
2.1 安装编译工具及相关依
安装 python3.11及开发包
postgres soft core 6291456
postgres hard core 6291456
EOF
cat>>/etc/sysctl.conf<<EOF
fs.file-max = 76724200
kernel.sem = 10000 10240000 10000 1024
kernel.shmmni = 4096
kernel.shmall = 2029616
kernel.shmmax = 8313307136
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_max = 1048576
fs.aio-max-nr = 40960000
vm.dirty_ratio=20
vm.dirty_background_ratio=3
vm.dirty_writeback_centisecs=100
vm.dirty_expire_centisecs=500
vm.swappiness=10
vm.min_free_kbytes=524288
vm.swappiness=0
vm.overcommit_memory=2
vm.overcommit_ratio=75
net.ipv4.ip_local_port_range = 10000 65535
EOF
sysctl -p
# 卸载系统自带的python3.6
yum remove python36
龙蜥 8.6安装postgresSQL+repmgrpostgis
2 / 28
of 28
10墨值下载
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文档的来源(墨天轮),文档链接,文档作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论

关注
最新上传
暂无内容,敬请期待...
下载排行榜
Top250 周榜 月榜