关键字:
KingbaseES、一键部署、人大金仓
搭建前的准备:
将以下五个文件收集到一个文件夹中(需注意文件权限属主需与集群所属用户一致):
(1)安装目录/DeployTools/zip中的db.zip
(2)安装目录/Server/bin/下或/DeployTools/zip中的部署脚本V8R6_cluster_install.sh或cluster_install.sh
(3)安装目录/Server/bin/下或/DeployTools/zip中的配置文件install.conf
(4)安装目录/Server/bin/下或/DeployTools/zip中的配置SSH免密脚本 trust_cluster.sh
(5)license.dat授权文件
修改install.conf(重点):
2.1必要参数(通用机):
all_ip=(10.10.9.15 10.10.9.16 10.10.8.16) 声明集群中将要配置的各个节点 空格分割
install_dir="/home/xieyp/cluster0/install1" 配置集群存放的目录
zip_package="/home/xieyp/cl/db.zip" 指定db.zip包的绝对路径
license_file=(license.dat) 配置授权文件的路径,
db_user="system" 访问数据库的用户名
db_port="50001" 数据库端口号,默认是54321,建议修改,避免重复
db_mode="oracle" 数据库模式 pg,oracle或mysql
trusted_servers="10.10.9.15,10.10.9.16,10.10.8.16" 同部署工具中的trust配置项
execute_user="xieyp" 填写执行者的用户名
deploy_by_sshd=1
use_scmd=1 代表先用ssh启动securecmd服务,再用securecmd部署集群
deploy_by_sshd=1
use_scmd=0 代表只用ssh部署集群,不启动securecmd
2.2扩缩容
2.2.1扩容(添加节点)
expand_type="0" . 0代表standby 1代表witness
primary_ip="10.10.9.15" 主节点ip
expand_ip="10.10.8.16" 将要扩容的standby/witness 节点
node_id="3" 节点的集群内编号,不可与其他节点重复
install_dir="/home/xieyp/cluster0/install1" 填写集群所在的路径
zip_package="/home/xieyp/cl/db.zip" 指定db.zip包的绝对路径
license_file=(license.dat) 配置license
2.2.2缩容(删除节点)
shrink_type="0" 0:standby 1:witness
primary_ip="10.10.9.15" 主节点ip
shrink_ip="10.10.8.16" 要删除的standby/witness 节点
node_id="3" 该节点的集群内编号
install_dir="/home/xieyp/cluster0/install1" 填写集群所在的路径
切root用户执行trust_cluster.sh配置免密:
执行cluster_install.sh :
(1)搭建集群 主节点执行 cluster_install.sh
(2)扩容节点 需要扩容的节点执行 cluster_install.sh expand
(3)缩容节点 主节点执行 cluster_install.sh shrink