Centos平台下openGauss 6.0.0RC1企业版单机部署

2024年 4月 29日 72.9k 0

一、openGauss6.0.0-RC1 版本说明

openGauss是一款开源关系型数据库管理系统,采用木兰宽松许可证v2发行。openGauss 6.0.0-RC1 是openGauss 2024年3月30日发布的创新版本,版本生命周期为 0.5 年。(创新版本命名:由原方案 XX.1.0 Preview (例:5.1.0 preview),调整为现方案 XX.0.0-RCx),本次发布包含 2 个数据库服务端安装版本:企业版、轻量版,用户可根据使用场景需要下载不同版本,并基于此进行场景化验证。openGauss 6.0.0 LTS 版本将在 2024 年 9 月 30 日进行发布。

openGauss版本号采用点分位命名规则(XX.Y.0)模式,创新版在版本号后增加“-RCx”表示。其中XX.0.0表示LTS版本,Y表示补丁版本,XX.0.0-RCx表示创新版本。正常每两年发布一个LTS版本,创新版本供用户联创测试使用;LTS版本作为长期支持版本,可规模上线使用。涉及重大问题修复时,会按需发布补丁版本。

openGauss生命周期初步规划为:

LTS版本发布间隔周期2年,社区提供3年维护支持。
创新版本发布间隔周期0.5年,社区提供0.5年维护支持。

二、openGauss 6.0.0-RC1 新特性

内核能力增强

企业级特性

1、存储过程增强:支持存储过程覆盖率测试并输出html报告,同时允许创建procedure时忽略依赖关系进行创建。

2、开箱最优:提供gs_perfconfig工具辅助对openGauss进行性能调整,基于环境信息与业务信息,自动调整操作系统以及数据库参数,达到开箱性能即最优。

3、其他能力增强:支持龙芯平台编译,支持中文日志;安装易用性提升,支持一站式交互安装,并解除对root用户的依赖。

内核四高能力

1、高性能

分区表性能:在多分区表场景(大于3000分区)下,TPCC数据导入耗时下降13%,TPCC性能提升30%;分区表数据操作(查询、插入、更新、删除等)耗时下降50%。

主备复制性能:支持UWAL组件,利用RDMA的CPU卸载、内核Bypass、零拷贝优势,由远程内存直接访问网卡,将WAL记录由单边操作传输至远端备库的持久化存储设备,加速主备XLog复制;基于SCM加速日志持久化,提供append语义,大IO后拆分后多并发写入,加速IO落盘。整体性能提升大于20%。

2、高可用

支持异步备升主数据找回能力, 新增gs_retrieve工具实现对旧主未同步到异步备的数据通过逻辑解码的方式找回,满足异步备升主场景RPO≈0。

3、高智能

新增dataVec向量数据库插件,作为为专有大模型的向量数据存储和检索的底座,支持向量数据的存储、 相似度计算,支持针对向量数据建立索引(IVFFLAT),加速查询。

4、高安全

在鲲鹏服务器上,通过CPU加解密指令实现对国密SM4算法加速,性能提升约5%。

DataPod三层资源池化架构持续创新

支持SPQ多机并行查询框架

基于资源池化架构所有节点都共享集群内的资源,支持生成多机执行计划,并将计划分发到各节点执行,查询节点可汇聚各节点数据实现所有读节点并行查询,充分发挥集群的OLAP能力,使资源池化同时具备较强的TP和AP能力,满足资源池化(一主两备)场景下TPC-H&TPC-DS相比单节点SMP提升大于2.6倍。

新增DMS资源统计视图

query_all_drc_info:支持收集DMS资源池中所有的页面信息和锁信息;

get_instr_wait_event:支持收集DMS相关命令字的等待时延等信息;

query_node_reform_info_from_dms:支持收集DMS中reform流程相关的状态信息。

DSS功能增强

DSS支持NoF/NoF+协议,支持该协议的IOFence、文件读写、查询设备信息、适配CM和OM等能力,用于对接支持该协议的磁盘阵列,典型业务下相比采用SCSI3协议的TPCC性能提升10%。DSS服务端支持创建线程池;DSS支持黑匣子诊断,提高运维能力。

容灾能力增强

1、 集群内高可用:支持XLog按需回放,实时解析XLog构建页面多版本恢复链,在主机故障时备机快速对外提供服务,实现典型业务负载下RTO> /etc/rc.d/rc.local /sys/kernel/mm/transparent_hugepage/defrag
fi
EOF

4.6 设置网卡MTU值

执行如下命令查询服务器的网卡名称。

ifconfig
使用如下命令将各数据库节点的网卡MTU值设置为相同大小。MTU值推荐8192,要求不小于1500。

ifconfig 网卡编号 mtu 值

4.7 设置root用户远程登录

检查主机的 sshd_config 文件内 PermitRootLogin 是否为 yes,如果不是,需要修改为 yes,并重启 sshd 服务
cat /etc/ssh/sshd_config | grep PermitRootLogin
PermitRootLogin yes
vi /etc/ssh/sshd_config

# 重启sshd服务
systemctl restart sshd

4.8 设置内核参数

vi /etc/sysctl.conf
net.ipv4.tcp_max_tw_buckets = 10000
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_keepalive_time = 30
net.ipv4.tcp_keepalive_probes = 9
net.ipv4.tcp_keepalive_intvl = 30
net.ipv4.tcp_retries1 = 5
net.ipv4.tcp_syn_retries = 5
net.ipv4.tcp_synack_retries = 5
net.ipv4.tcp_retries2 = 12
vm.overcommit_memory = 0
net.ipv4.tcp_rmem = 8192 250000 16777216
net.ipv4.tcp_wmem = 8192 250000 16777216
net.core.wmem_max = 21299200
net.core.rmem_max = 21299200
net.core.wmem_default = 21299200
net.core.rmem_default = 21299200
net.ipv4.ip_local_port_range = 26000 65535
kernel.sem = 250 6400000 1000 25600
net.core.somaxconn = 65535
net.ipv4.tcp_syncookies = 1
net.core.netdev_max_backlog = 65535
net.ipv4.tcp_max_syn_backlog = 65535
net.ipv4.tcp_fin_timeout = 60
kernel.shmall = 1152921504606846720
kernel.shmmax = 18446744073709551615
net.ipv4.tcp_sack = 1
net.ipv4.tcp_timestamps = 1
vm.extfrag_threshold = 500
vm.overcommit_ratio = 90
vm.swappiness = 0

#内核参数生效
sysctl -p

4.9配置资源限制

vi /etc/security/limits.conf

* soft nofile 1000000
* hard nofile 1000000
* soft nproc 655360
* hard nproc 655360
* soft memlock unlimited
* hard memlock unlimited
* soft core unlimited
* hard core unlimited
* soft stack unlimited
* hard stack unlimited

4.安装python3

#安装python3
yum install -y python3
#设置python指向python3
cd /usr/bin
ln -s python3 python
#查看python版本
python -V
输出:Python 3.6.8

4.10创建用户及用户组

groupadd -g 1101 dbgrp
useradd -g dbgrp -u 1101 -m omm
passwd omm

4.11 安装包解压

cd /opt/software
tar -zxvf openGauss-6.0.0-RC1-CentOS-64bit-all.tar.gz
tar -zxvf openGauss-6.0.0-RC1-CentOS-64bit-om.tar.gz

4.12 创建安装目录并授权

mkdir -p /data/opengauss
chown -R omm: /data/opengauss
chmod -R 755 /data/opengauss

4.13 编辑xml配置文件

vi /opt/software/script/cluster_config.xml

2、初始化安装环境(root用户)

cd /opt/software/script
./gs_preinstall -U omm -G dbgrp -X ./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.
Are you sure you want to create the user[omm] (yes/no)? yes
Preparing SSH service.
Successfully prepared SSH service.
Checking OS software.
Successfully check OS software.
Checking OS version.
Successfully checked OS version.
Checking cpu instructions.
Successfully checked cpu instructions.
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/script/gs_checkos -i A -h node1 -X /opt/software/script/cluster_config.xml --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.

3、正式安装(omm用户)

su - omm
gs_install -X /opt/software/script/cluster_config.xml --gsinit-parameter="--locale=en_US.utf8"
#安装日志如下
Parsing the configuration file.
Successfully checked gs_uninstall on every node.
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 /data/opengauss/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..

五、openGauss 6.0.0-RC1连接测试

1、gsql连接

[omm@node1 ~]$ gsql -d postgres -p 15400 -r
gsql ((openGauss 6.0.0-RC1 build ed7f8e37) compiled at 2024-03-31 11:59:31 commit 0 last mr )
Non-SSL connection (SSL connection is recommended when requiring high-security)
Type "help" for help.

openGauss=# select version();
version
-----------------------------------------------------------------------------------------------------------------------------------------------------------
(openGauss 6.0.0-RC1 build ed7f8e37) compiled at 2024-03-31 11:59:31 commit 0 last mr on x86_64-unknown-linux-gnu, compiled by g++ (GCC) 10.3.0, 64-bit
(1 row)

2、dbeaver连接

六、安装过程中碰到的问题

1、python3: No such file or directory

[root@node1 script]# ./gs_preinstall -U omm -G dbgrp -X ./cluster_config.xml
/usr/bin/env: python3: No such file or directory
解决办法:
cd /usr/bin
ln -s python3 python

相关文章

Oracle如何使用授予和撤销权限的语法和示例
Awesome Project: 探索 MatrixOrigin 云原生分布式数据库
下载丨66页PDF,云和恩墨技术通讯(2024年7月刊)
社区版oceanbase安装
Oracle 导出CSV工具-sqluldr2
ETL数据集成丨快速将MySQL数据迁移至Doris数据库

发布评论