系统环境
欧拉系统官方下载链接
openEuler-22.03-LTS-SP4-x86_64-dvd.iso
https://mirrors.tuna.tsinghua.edu.cn/openeuler/openEuler-22.03-LTS-SP4/ISO/x86_64/openEuler-22.03-LTS-SP4-x86_64-dvd.iso
openEuler下载 | openEuler ISO镜像 | openEuler社区官网
数据库安装包下载
https://opengauss.org/zh/download/
系统安装选择最小化安装此处省去安装步骤
测试环境为vmware虚拟机,安装截图如下:
前期软件环境准备
参考官方链接,联网环境可以使用yum进行软件包配置如下
yum安装依赖, 参考官方文档的依赖如下图,
yum install libaio-devel readline-devel expect Python
详细步骤参考官方手册文档:
创建用户和组
创建用户组dbgroup。 groupadd dbgroup 创建用户组dbgroup下的普通用户omm,并设置密码为omm useradd -g dbgrp -m omm -d /home/omm passwd omm passwd Admin@2024
xml配置文件参考:
手工创建xml配置文件参考如下:
<?xml version="1.0" encoding="UTF-8"?> <ROOT> <!-- 整体信息 --> <CLUSTER> <!-- 数据库名称 --> <PARAM name="clusterName" value="Cluster_template" /> <!-- 数据库节点名称(hostname) --> <PARAM name="nodeNames" value="node1_hostname,node2_hostname" /> <!-- 数据库安装目录--> <PARAM name="gaussdbAppPath" value="/opt/huawei/install/app" /> <!-- 日志目录--> <PARAM name="gaussdbLogPath" value="/var/log/omm" /> <!-- 临时文件目录--> <PARAM name="tmpMppdbPath" value="/opt/huawei/tmp" /> <!--数据库工具目录--> <PARAM name="gaussdbToolPath" value="/opt/huawei/install/om" /> <!--数据库core文件目录--> <PARAM name="corePath" value="/opt/huawei/corefile"/> <!-- 节点IP,与nodeNames一一对应 --> <PARAM name="backIp1s" value="192.168.0.1,192.168.0.2"/> <!-- 是否开启数据库节点自选主 --> <PARAM name="enable_dcf" value="on"/> <!-- 开启开关后对应的节点IP、PORT和角色信息 --> <PARAM name="dcf_config" value="[{"stream_id":1,"node_id":1,"ip":"8.92.1.85","port":16683,"role":"LEADER"},{"stream_id":1,"node_id":2,"ip":"8.92.1.86","port":16683,"role":"FOLLOWER"},{"stream_id":1,"node_id":3,"ip":"8.92.1.87","port":16683,"role":"FOLLOWER"}]"/> <!-- 资源池化模式开关 --> <PARAM name="enable_dss" value="on"/> <!-- dss实例目录 --> <PARAM name="dss_home" value="/opt/huawei/install/data/dss"/> <!-- dss共享卷名 --> <PARAM name="ss_dss_vg_name" value="data"/> <!-- dss挂载卷组名和卷组信息,包含共享卷 --> <PARAM name="dss_vg_info" value="data:/dev/sdb,p0:/dev/sdc,p1:/dev/sdd"/> <!-- cm投票卷 --> <PARAM name="votingDiskPath" value="/dev/sde"/> <!-- cm共享卷 --> <PARAM name="shareDiskDir" value="/dev/sdf"/> <!-- dss开启ssl认证开关 --> <PARAM name="dss_ssl_enable" value="on"/> <!-- mes通信协议类型 --> <PARAM name="ss_interconnect_type" value="TCP"/> <!-- rdma绑定cpu序列 --> <PARAM name="ss_rdma_work_config" value="1 7"/> <!-- VIP信息 --> <PARAM name="floatIp1" value="10.10.10.100"/> <PARAM name="floatIp2" value="20.20.20.100"/> <PARAM name="floatIp3" value="30.30.30.100"/> </CLUSTER>
修改其中的网络参数和主机名
初始化安装环境:
参考官方:
部署脚本执行结果
[root@test script]# ./gs_preinstall -U omm -G dbgrp -L -X /opt/software/openGauss/cluster_config.xml Parsing the configuration file. Successfully parsed the configuration file. Installing the tools on the local node. Successfully installed the tools on the local node. Setting host ip env Successfully set host ip env. Preparing SSH service. Successfully prepared SSH service. Checking OS software. Successfully check os software. Checking OS version. Successfully checked OS version. Creating cluster's path. Successfully created cluster's path. Set and check OS parameter. Setting OS parameters. Successfully set OS parameters. Warning: Installation environment contains some warning messages. Please get more details by "/opt/software/openGauss/script/gs_checkos -i A -h test --detail". Set and check OS parameter completed. Preparing CRON service. Successfully prepared CRON service. Setting user environmental variables. Successfully set user environmental variables. Setting the dynamic link library. Successfully set the dynamic link library. Setting Core file Successfully set core path. Setting pssh path Successfully set pssh path. Setting Cgroup. Successfully set Cgroup. Set ARM Optimization. No need to set ARM Optimization. Fixing server package owner. Setting finish flag. Successfully set finish flag. Preinstallation succeeded. [root@test script]#
执行安装
安装参考官方例子:
切换omm用户执行安装
[root@test script]# chmod -R 775 /opt/ [root@test script]# ls -l /opt/ total 8 drwxrwxr-x 5 omm dbgrp 4096 Jul 17 15:32 huawei drwxrwxr-x 3 root root 4096 Jul 17 15:09 software [root@test script]# su - omm Last login: Wed Jul 17 15:36:36 CST 2024 on pts/0 Welcome to 5.10.0-216.0.0.115.oe2203sp4.x86_64 System information as of time: Wed Jul 17 03:39:25 PM CST 2024 System load: 0.09 Memory used: 14.4% Swap used: 0% Usage On: 5% IP address: 192.168.80.131 Users online: 1 To run a command as administrator(user "root"),use "sudo <command>". [omm@test ~]$ gs_install -X /opt/software/openGauss/cluster_config.xml Parsing the configuration file. Check preinstall on every node. Successfully checked preinstall on every node. Creating the backup directory. Successfully created the backup directory. begin deploy.. Installing the cluster. begin prepare Install Cluster.. Checking the installation environment on all nodes. begin install Cluster.. Installing applications on all nodes. Successfully installed APP. begin init Instance.. encrypt cipher and rand files for database. Please enter password for database: Please repeat for database: begin to create CA cert files The sslcert will be generated in /opt/huawei/install/app/share/sslcert/om NO cm_server instance, no need to create CA for CM. Non-dss_ssl_enable, no need to create CA for DSS Cluster installation is completed. Configuring. Deleting instances from all nodes. Successfully deleted instances from all nodes. Checking node configuration on all nodes. Initializing instances on all nodes. Updating instance configuration on all nodes. Check consistence of memCheck and coresCheck on database nodes. Configuring pg_hba on all nodes. Configuration is completed. The cluster status is Normal. Successfully started cluster. Successfully installed application. end deploy.. [omm@test ~]$
安装完毕验证
检查安装目录和数据库状态如下脚本示例
[omm@test ~]$ ls -lh /opt/huawei/ total 12K drwxrwxr-x 2 omm dbgrp 4.0K Jul 17 15:32 corefile drwxrwxr-x 5 omm dbgrp 4.0K Jul 17 15:39 install drwx------ 2 omm dbgrp 4.0K Jul 17 15:41 tmp [omm@test ~]$ gs_om -t status ----------------------------------------------------------------------- cluster_name : dbCluster cluster_state : Normal redistributing : No ----------------------------------------------------------------------- [omm@test ~]$ gsql -d postgres -p 15400 gsql ((openGauss 5.0.2 build 48a25b11) compiled at 2024-05-14 10:26:01 commit 0 last mr ) Non-SSL connection (SSL connection is recommended when requiring high-security) Type "help" for help. openGauss=#
数据库DataStudio_win_64链接工具配置
软件链接及文档下:
windows 64位置下载链接:
https://opengauss.obs.cn-south-1.myhuaweicloud.com/5.0.0/tools/DataStudio_win_64.zip
按照文档操作下载java环境,安装jdk11,官方链接如下
https://download.oracle.com/otn/java/jdk/11.0.23%2B7/9bd8d305c900ee4fa3e613b59e6f42de/jdk-11.0.23_windows-x64_bin.exe
标签:5.0,set,Successfully,omm,cluster,华为,test,openGauss,nodes From: https://www.cnblogs.com/wenxiao1-2-3-4/p/18307548