环境准备
1、关闭防火墙
systemctl stop firewalld
2、关闭selinux
临时禁用:setenforce 0
永久关闭:
vi /etc/selinux/config
SELINUX=disabled
reboot
3、修改系统环境字符集
echo $LANG
export LANG=en_US.UTF-8
永久修改
vi /etc/profile
添加 export LANG=en_US.UTF-8
source /etc/profile
4、设置时区和时间
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
5、关闭交换区
swapoff -a
6、修改hosts
ip hostname
安装过程
1、解压安装脚本
tar -xvf GaussDBInstaller_Vx.x.x.x.tar.gz
2、解压安装包到 安装脚本的pkgDir目录下
tar -xvf GaussDB_X86_Kylinv10_Centralized_2.23.01.220_20230609012225.tar.gz -C /root/GaussDBInstaller/GaussDBInstaller/pkgDir/
3、配置install_cluster.conf
vi /root/GaussDBInstaller/GaussDBInstaller/
4、复制安装模式json文件到 GaussDBInstaller 根目录下(本次为集中部署),修改配置文件
cp jsonFileSample/3_nodes_centralized.json ./install_cluster.json
vi install_cluster.json
{ "rdsAdminUser": "rdsAdmin", "rdsAdminPasswd": "XXX", "rdsMetricUser": "rdsMetric", "rdsMetricPasswd": "XXX", "rdsReplUser": "rdsRepl", "rdsReplPasswd": "XXX", "rdsBackupUser": "rdsBackup", "rdsBackupPasswd": "XXX", "dbPort": "30100", "dbUser": "root", "dbUserPasswd": "XXX", "clusterMode": "ha", "params": { "enable_thread_pool": "on", "enable_bbox_dump": "on", "bbox_dump_path": "/home/core" }, "cnParams": {}, "dnParams": {}, "cmParams": {}, "clusterConf": { "clusterName": "Gauss_XuanYuan", "encoding": "utf8", "shardingNum": 1, "replicaNum": 3, "solution": "hws", "cm": [ { "rack": "gauss001", #hostname"az": "AZ1", "ip": "ip1", "dataIp": "ip1_data", "virtualIp": "ip1_virtual" }, { "rack": "gauss002", "az": "AZ2", "ip": "ip2", "dataIp": "ip2_data", "virtualIp": "ip2_virtual" }, { "rack": "gauss003", "az": "AZ3", "ip": "ip3", "dataIp": "ip3_data", "virtualIp": "ip3_virtual" } ], "shards": [ [ { "rack": "gauss001", "az": "AZ1", "ip": "ip1", "dataIp": "ip1_data", "virtualIp": "ip1_virtual" }, { "rack": "gauss002", "az": "AZ2", "ip": "ip2", "dataIp": "ip2_data", "virtualIp": "ip2_virtual" }, { "rack": "gauss003", "az": "AZ3", "ip": "ip3", "dataIp": "ip3_data", "virtualIp": "ip3_virtual" } ] ], "etcd": { "nodes": [ { "rack": "gauss001", #hostname"az": "AZ1", "ip": "ip1", "dataIp": "ip1_data", "virtualIp": "ip1_virtual" }, { "rack": "gauss002", "az": "AZ2", "ip": "ip2", "dataIp": "ip2_data", "virtualIp": "ip2_virtual" }, { "rack": "gauss003", "az": "AZ3", "ip": "ip3", "dataIp": "ip3_data", "virtualIp": "ip3_virtual" } ] } } }
5、安装
python3 gaussdb_install.py --action main