背景

由易到难
先进行单节点的设置

先说坑

openEuler2203 默认安装了python3.9 但是openGauss里面指代了3.6和3.7
/openGauss/install/om
注意在clusterconfig 里面的这个目录
必须包含很多文件. 为了好处理 我讲所有的文件又放进去了一遍. 这样才能正常安装

吐槽一下公司的网络打不开华为的很多文档. 浪费了好久
另外部分文件不全 openGauss的反馈信息也不全面,导致我不好分析.
xxxx

部分配置

感觉这个配置挺好的

但是 改MTU风险挺大的 我感觉..
以后环境的优化可以使用之.
Warning reason: network 'ens160' 'mtu' RealValue '1500' ExpectedValue '8192'
Warning reason: network 'ens160' 'tx' RealValue '512' ExpectValue '4096'.
Warning reason: variable 'net.ipv4.tcp_fin_timeout' RealValue '30' ExpectedValue '60'.
Warning reason: variable 'net.ipv4.tcp_retries1' RealValue '3' ExpectedValue '5'.
Warning reason: variable 'net.ipv4.tcp_syn_retries' RealValue '6' ExpectedValue '5'.

CentOS的配置

注意需要编辑一个cluster的配置文件可以修改默认值
然后本次的结果为
<?xml version="1.0" encoding="utf-8"?>
<ROOT>
<CLUSTER>
<PARAM name="clusterName" value="GSCloud_openGauss" />
<PARAM name="nodeNames" value="centos7"/>
<PARAM name="gaussdbAppPath" value="/openGauss/install/app" />
<PARAM name="gaussdbLogPath" value="/var/log/omm" />
<PARAM name="tmpMppdbPath" value="/openGauss/tmp"/>
<PARAM name="gaussdbToolPath" value="/openGauss/install/om" />
<PARAM name="corePath" value="/openGauss/corefile"/>
<PARAM name="backIp1s" value="10.110.139.231"/>
</CLUSTER>

<DEVICELIST>
<DEVICE sn="centos7">
<PARAM name="name" value="centos7"/>
<PARAM name="azName" value="AZ1"/>
<PARAM name="azPriority" value="1"/>
<PARAM name="backIp1" value="10.110.139.231"/>
<PARAM name="sshIp1" value="10.110.139.231"/>
<!-- dn -->
<PARAM name="dataNum" value="1"/>
<PARAM name="dataPortBase" value="15400"/>
<PARAM name="dataNode1" value="/openGauss/install/data/dn"/>
<PARAM name="dataNode1_syncNum" value="0"/>
</DEVICE>
</DEVICELIST>
</ROOT>

参数设置

cat>> /etc/profile<<EOF
export LD_LIBRARY_PATH=/openGauss/script/gspylib/clib:$LD_LIBRARY_PATH
export PGDATA=/openGauss/install/data/dn01
EOF
/openGauss/script/gs_preinstall -U omm -G dbgrp -X /openGauss/clusterconfig.xml
注意可能需要 sysctl -p 进行生效.
注意需要将/openGauss 目录设置 755权限. 给用户omm设置属主. 必须处理不然无法使用.

然后可以进行简单检查
/openGauss/script/gs_checkos -i A -h centos7 --detail

进行安装

su - omm 

/openGauss/script/gs_install -X /openGauss/clusterconfig.xml

启动以及关闭

gs_ctl restart
gs_ctl stop
gs_ctl start
登录数据库
gsql -d postgres -p 15400

跟自己设置的环境变量相关
vim /openGauss/install/data/dn/pg_hba.conf
注意需要修改pg_hba 避免安全问题.

查看默认数据库和默认用户
select current_database();
select current_user;