学习openGauss
了解openGauss
openGauss内核源自PostgreSQL,并着重在架构、事务、存储引擎、优化器等方向持续构建竞争力特性,在ARM架构的芯片上深度优化,并兼容X86架构。实现以下技术特点:
基于多核架构的并发控制技术、NUMA-Aware存储引擎、SQL-Bypass智能选路执行技术,释放处理器多核扩展能力,实现两路鲲鹏128核场景150万tpmC性能
支持RTO<10S的快速故障倒换,全链路数据保护,满足安全及可靠性要求
通过智能参数调优、慢SQL诊断、多维性能自监控、在线SQL时间预测等能力,让运维由繁至简
openGauss服务器急速安装
前提条件
· 已完成用户组和普通用户的创建。
· 所有服务器操作系统和网络均正常运行。
· 普通用户必须有数据库包解压路径、安装路径的读、写和执行操作权限,并且安装路径必须为空。
· 普通用户对下载的openGauss压缩包有执行权限。
· 安装前请检查指定的openGauss端口是否被占用,如果被占用请更改端口或者停止当前使用端口进程。操作步骤
1.使用普通用户登录到openGauss包安装的主机,解压openGauss压缩包到安装目录。tar -jxf openGauss-x.x.x-openEuler-64bit.tar.bz2 -C /opt/software/openGauss
2.假定解压包的路径为/opt/software/openGauss,进入解压后目录下的simpleInstall。cd /opt/software/openGauss/simpleInstall
3.执行install.sh脚本安装openGauss。sh install.sh -w "xxxx" &&source ~/.bashrc说明:-w:初始化数据库密码(gs_initdb指定),因安全需要,此项必须设置。-p:指定openGauss端口号,如不指定,默认为5432。-h|–help:打印使用说明。安装后,该数据库部署节点的名称为sgnode(gs_initdb指定)。执行时,如果出现报错“the maximum number of SEMMNI is not correct, the current SEMMNI is xxx. Please check it.”,请使用有root权限的用户执行如下命令。sysctl -w kernel.sem="250 85000 250 330"
安装后,数据库目录安装路径/opt/software/openGauss/data/single_node,其中/opt/software/openGauss为解压包路径,data/single_node为新创建的数据库节点目录。安装完成后,默认生成名称为postgres的数据库。第一次连接数据库时可以连接到此数据库。4.安装执行完成后,使用ps和gs_ctl查看进程是否正常。ps ux | grep gaussdb
gs_ctl query -D /opt/software/openGauss/data/single_node
执行ps命令,显示类似如下信息:omm 24209 11.9 1.0 1852000 355816 pts/0 Sl 01:54 0:33 /opt/software/openGauss/bin/gaussdb -D /opt/software/openGauss/single_node
omm 20377 0.0 0.0 119880 1216 pts/0 S+ 15:37 0:00 grep --color=auto gaussdb
执行gs_ctl命令,显示类似如下信息:gs_ctl query ,datadir is /opt/software/openGauss/data/single_node
HA state:local_role : Normalstatic_connections : 0db_state : Normaldetail_information : NormalSenders info:No informationReceiver info:
No information