GaussDB安装
环境准备
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
7、安装或升级Python3.7.9 强依赖,不知道更高版本行不行
安装过程
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": "metricUser", "rdsMetricPasswd": "xxx", "rdsReplUser": "repUser", "rdsReplPasswd": "xxx", "rdsBackupUser": "backupUser", "rdsBackupPasswd": "xxx", "dbPort":"30100", #DB端口 "dbUser": "root", #给用户分配的最高权限账户 "dbUserPasswd": "xxx", "clusterMode": "ha", "params": { "enable_thread_pool": "off" }, "cnParams": {}, "dnParams": {}, "cmParams": {}, "clusterConf": { "clusterName": "GaussDB", "gtmFree": 1, "encoding": "utf8", "shardingNum": 1, "replicaNum": 1, "solution": "hws", "shards": [ [{ "rack": "kylinv10sp3", "az": "AZ1", "ip": "xxx", "dataIp": "xxx", "virtualIp":"xxx" } ]], "cm": [ { "rack": "kylinv10sp3", "az": "AZ1", "ip": "xxx", "dataIp": "xxx", "virtualIp":"xxx" } ] } }
5、安装
python3 gaussdb_install.py --action main
6、非必须的配置,允许自定义创建函数,切换 omm用户执行
gs_guc reload -Z coordinator -Z datanode -N all -I all -c "behavior_compat_options='skip_insert_gs_source,forbid_package_function_with_prefix,enable_bpcharlikebpchar_compare,enable_crosstype_integer_operator'";