diff --git "a/Centos 7 \347\263\273\347\273\237 openGauss 3.1.0 \344\270\200\344\270\273\344\270\244\345\244\207\351\233\206\347\276\244\345\234\250\347\272\277\346\211\251\345\256\271.md" "b/Centos 7 \347\263\273\347\273\237 openGauss 3.1.0 \344\270\200\344\270\273\344\270\244\345\244\207\351\233\206\347\276\244\345\234\250\347\272\277\346\211\251\345\256\271.md"
new file mode 100644
index 0000000000000000000000000000000000000000..4920581886fe78f73258c6022d424b5ceb7e6c24
--- /dev/null
+++ "b/Centos 7 \347\263\273\347\273\237 openGauss 3.1.0 \344\270\200\344\270\273\344\270\244\345\244\207\351\233\206\347\276\244\345\234\250\347\272\277\346\211\251\345\256\271.md"
@@ -0,0 +1,815 @@
+### 一、安装环境设置
+
+
+
+#### 1.1 硬件环境
+
+
+
+| 名称 | 最低配置 | 建议配置 | 测试配置 |
+| :--------: | ------------------------------------------------------------ | -------- | :------: |
+| 服务器数量 | 3 | 略 | 略 |
+| 硬盘 | * 至少1GB用于安装openGauss的应用程序。
* 每个主机需大约300MB用于元数据存储。
* 预留70%以上的磁盘剩余空间用于数据存储。 | 略 | 略 |
+| 内存 | >=2G | 略 | 略 |
+| CPU | 功能调试最小1×8核,2.0GHz | 略 | 略 |
+| 网络 | 300兆以上以太网,生产建议采用bond | 略 | 略 |
+
+#### 1.2 软件环境
+
+| 软件类型 | 信息描述 |
+| ---------------- | ------------------------------------------------------------ |
+| 操作系统 | Centos 7.6 |
+| Linux文件系统 | 剩余inode个数 > 15亿(推荐) |
+| 工具 | bzip2 |
+| Python | * oepnEuler:支持Python 3.7.x
* Centos 7.6: 支持Python 3.6.x |
+| 数据库版本 | opengauss 3.1.0 企业版 |
+| 数据库软件包名称 | openGauss-3.1.0-CentOS-64bit-all.tar.gz |
+
+##### 1.2.1 安装python
+
+
+
+```powershell
+-- root用户【新增备库节点】
+# 本次选择安装python 3.6.5版本
+mkdir /usr/local/python3
+cd /usr/local/python3
+wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tgz
+tar -zxf Python-3.6.5.tgz
+cd /usr/local/python3/Python-3.6.5
+./configure --prefix=/usr/local/python3 --enable-shared CFLAGS=-fPIC
+make && make install
+ln -s /usr/local/python3/bin/python3 /usr/bin/python3
+ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3
+
+-- 设置环境变量
+cat >>/etc/profile<> /etc/ld.so.conf
+ldconfig
+
+-- 如遇如下报错
+python3: error while loading shared libraries: libpython3.6m.so.1.0: cannot open shared object file: No such file or directory
+可执行 cp /usr/local/python3/Python-3.6.5/libpython3.6m.so.1.0 /usr/lib64/
+```
+
+##### 1.2.2 安装软件依赖包
+
+###### 1.2.2.1 软件依赖要求
+
+| 所需软件 | 建议版本 |
+| :---------------------------- | :------------------------ |
+| libaio-devel | 建议版本:0.3.109-13 |
+| flex | 要求版本:2.5.31 以上 |
+| bison | 建议版本:2.7-4 |
+| ncurses-devel | 建议版本:5.9-13.20130511 |
+| glibc-devel | 建议版本:2.17-111 |
+| patch | 建议版本:2.7.1-10 |
+| redhat-lsb-core | 建议版本:4.1 |
+| readline-devel | 建议版本 :7.0-13 |
+| libnsl(openeuler+x86环境中) | 建议版本 :2.28-36 |
+
+###### 1.2.2.2 安装软件依赖包
+
+```powershell
+-- root用户 【新增备库节点】
+-- 安装依赖包
+yum install -y libaio-devel flex bison ncurses-devel glibc-devel patch redhat-lsb-core readline-devel zlib readline gcc perl-ExtUtils-Embed readline-devel zlib-devel expect
+
+-- 检查是否已安装
+rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep -E "libaio-devel|flex|bison|ncurses-devel|glibc-devel|patch|redhat-lsb-core|readline-devel|zlib|readline|gcc|python|python-devel|perl-ExtUtils-Embed|readline-devel|zlib-devel|expect"
+```
+
+##### 1.2.3 操作系统配置
+
+###### 1.2.3.1 修改操作系统参数
+
+```powershell
+-- root用户 【新增备库节点】
+-- 添加如下参数:
+cat>>/etc/sysctl.conf <> /etc/rc.d/rc.local< /sys/kernel/mm/transparent_hugepage/enabled
+fi
+if test -f /sys/kernel/mm/transparent_hugepage/defrag;
+ then
+ echo never > /sys/kernel/mm/transparent_hugepage/defrag
+fi
+EOF
+
+-- 查看是否关闭:
+cat /sys/kernel/mm/transparent_hugepage/enabled
+cat /sys/kernel/mm/transparent_hugepage/defrag
+```
+
+###### 1.2.3.3 关闭防火墙
+
+```powershell
+-- root用户 【新增备库节点】
+systemctl disable firewalld.service
+systemctl stop firewalld.service
+```
+
+###### 1.2.3.4 关闭selinux
+
+```powershell
+-- root用户 【新增备库节点】
+sed -i "s/SELINUX=enforcing/SELINUX=disabled/" /etc/selinux/config
+-- 检查
+cat /etc/selinux/config | grep disabled
+```
+
+###### 1.2.3.5 修改字符集
+
+```powershell
+-- root用户 【新增备库节点】
+cat>> /etc/profile<>/etc/ssh/sshd_config<>/etc/ssh/sshd_config<>/etc/resolv.conf<> /etc/hosts<
+
+```powershell
+-- root用户 【新增备库节点】
+-- 创建dbgrp用户组,组ID同主库
+[root@opengauss-db4 ~]# /usr/sbin/groupadd -g 1004 dbgrp
+-- 创建omm用户,用户ID同主库
+[root@opengauss-db4 ~]# /usr/sbin/useradd -u 1003 -g dbgrp -G dbgrp omm
+-- 设置omm用户密码
+[root@opengauss-db4 ~]# echo "omm123" | passwd --stdin omm
+```
+
+##### 3.1.2 配置互信
+
+```powershell
+-- 配置互信,配置root用户及omm用户互信
+
+-- 配置 root 用户互信【主节点 root用户执行】
+[root@opengauss-db1 ~]# cd /opt/software/openGauss/script/
+[root@opengauss-db1 script]# vim hostfile -- 在该目录下编辑所有节点IP文件,参照如下
+192.168.17.113
+192.168.17.139
+192.168.17.159
+192.168.17.112
+-- 执行gs_sshexkey 配置互信
+[root@opengauss-db1 script]# ./gs_sshexkey -f hostfile
+Please enter password for current user[root].
+Password: -- 输入 root口令
+Checking network information.
+All nodes in the network are Normal.
+Successfully checked network information.
+Creating SSH trust.
+Creating the local key file.
+Successfully created the local key files.
+Appending local ID to authorized_keys.
+Successfully appended local ID to authorized_keys.
+Updating the known_hosts file.
+Successfully updated the known_hosts file.
+Appending authorized_key on the remote node.
+Successfully appended authorized_key on all remote node.
+Checking common authentication file content.
+Successfully checked common authentication content.
+Distributing SSH trust file to all node.
+Distributing trust keys file to all node successfully.
+Successfully distributed SSH trust file to all node.
+Verifying SSH trust on all hosts.
+Successfully verified SSH trust on all hosts.
+Successfully created SSH trust.
+
+-- 测试root用户互信
+[root@opengauss-db1 script]# ssh 192.168.17.112
+[root@opengauss-db1 script]# ssh 192.168.17.139
+[root@opengauss-db1 script]# ssh 192.168.17.159
+
+-- 配置 omm 用户互信 【主节点 omm 用户执行】
+[omm@opengauss-db1 ~]$ cd /u01/app/software/script/
+[omm@opengauss-db1 script]$ ./gs_sshexkey -f hostfile
+Please enter password for current user[omm].
+Password:
+Checking network information.
+All nodes in the network are Normal.
+Successfully checked network information.
+Creating SSH trust.
+Creating the local key file.
+Successfully created the local key files.
+Appending local ID to authorized_keys.
+Successfully appended local ID to authorized_keys.
+Updating the known_hosts file.
+Successfully updated the known_hosts file.
+Appending authorized_key on the remote node.
+Successfully appended authorized_key on all remote node.
+Checking common authentication file content.
+Successfully checked common authentication content.
+Distributing SSH trust file to all node.
+Distributing trust keys file to all node successfully.
+Successfully distributed SSH trust file to all node.
+Verifying SSH trust on all hosts.
+Successfully verified SSH trust on all hosts.
+Successfully created SSH trust.
+
+-- 测试omm用户互信
+[omm@opengauss-db1 script]$ ssh 192.168.17.112
+[omm@opengauss-db1 script]$ ssh 192.168.17.139
+[omm@opengauss-db1 script]$ ssh 192.168.17.159
+
+-- gs_sshexkey 详细语法可查看 gs_sshexkey -? | --help
+```
+
+##### 3.1.3 配置新增节点环境变量
+
+```powershell
+-- 拷贝已有节点omm用户环境变量文件至新增节点
+[omm@opengauss-db1 ~]$ scp .bashrc omm@192.168.17.112:/home/omm/
+
+[omm@opengauss-db1 ~]$ scp .bash_profile omm@192.168.17.112:/home/omm/
+
+-- 修改新增节点 omm用户.bashrc, 删除 或 注释 export GAUSS_ENV=2
+# GAUSS_ENV 值为2表示安装成功
+
+-- 生效新增节点 omm 用户环境变量
+[omm@opengauss-db4 ~]$ source .bashrc
+[omm@opengauss-db4 ~]$ source .bash_profil
+
+-- 拷贝已有节点root用户环境变量文件至新增节点
+[root@opengauss-db1 ~]# scp -r /etc/profile root@192.168.17.112:/etc/profile
+
+-- 生效新增节点root用户环境变量
+[root@opengauss-db4 ~]# source /etc/profile
+```
+
+##### 3.1.4 修改XML配置文件
+
+
+
+###### 3.1.4.1 配置XML文件
+
+```powershell
+-- 主节点 root 用户
+-- 在 /opt/software/openGauss 目录下修改 clusterconfig.xml配置文件
+-- 执行操作如下
+cat > clusterconfig.xml<
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+EOF
+```
+
+###### 3.1.4.2 参数简介
+
+| 实例类型 | 参数 | 说明 |
+| :--------- | :----------------------------------------------------------- | :------- |
+| 整体信息 | name | 主机名称 |
+| azName | 指定azName(Available Zone Name),字符串(不能含有特殊字符),例如AZ1、AZ2、AZ3。 | |
+| azPriority | 指定azPriority的优先级。 | |
+| backIp1 | 主机在后端存储网络中的IP地址(内网IP)。所有openGauss主机使用后端存储网络通讯。 | |
+| sshIp1 | 设置SSH可信通道IP地址(外网IP)。若无外网,则可以不设置该选项或者同backIp1设置相同IP。 | |
+
+##### 3.1.5 拷贝主节点clusterconfig.xml至新增节点
+
+```powershell
+-- 新增节点创建 /opt/software/openGauss 目录
+[root@opengauss-db4 ]# mkdir -p /opt/software/openGauss
+-- 拷贝主节点 clusterconfig.xml 文件至新增节点同目录处
+[root@opengauss-db1 ]# scp /opt/software/openGauss/clusterconfig.xml omm@opengauss-db4:/opt/software/openGauss
+```
+
+#### 3.2 集群扩容
+
+```powershell
+-- 主节点 【root 用户执行】
+[omm@opengauss-db1 ~]$ su - root
+Password:
+Last login: Fri Nov 11 15:14:54 CST 2022 from 192.168.16.10 on pts/0
+[root@opengauss-db1 ~]# cd /opt/software/openGauss/script
+[root@opengauss-db1 script]# source /home/omm/.bashrc
+[root@opengauss-db1 script]# ./gs_expansion -U omm -G dbgrp -X /opt/software/openGauss/clusterconfig.xml -h 192.168.17.112
+
+执行结果如下:
+Start expansion with cluster manager component.
+Start to send soft to each standby nodes.
+End to send soft to each standby nodes.
+Success to send XML to new nodes
+Start to perform perinstall on nodes: ['opengauss-db4']
+Preinstall command is: /tmp/gs_expansion_2022-11-13_21_31_49_537605/pkg/script/gs_preinstall -U omm -G dbgrp -X /opt/software/openGauss/clusterconfig.xml -L --non-interactive 2>&1
+Success to perform perinstall on nodes ['opengauss-db4']
+Success to change user to [omm]
+Installing applications on all new nodes.
+Install on new node output: [SUCCESS] opengauss-db4:
+Using omm:dbgrp to install database.
+Using installation program path : /opt/gaussdb/install/app
+Command for creating symbolic link: ln -snf /opt/gaussdb/install/app_4e931f9a /opt/gaussdb/install/app.
+Decompressing bin file.
+Decompress CM package command: export LD_LIBRARY_PATH=$GPHOME/script/gspylib/clib:$LD_LIBRARY_PATH && tar -zxf "/opt/gaussdb/gausstools/om/script/os_platform/./../../openGauss-3.1.0-CentOS-64bit-cm.tar.gz" -C "/opt/gaussdb/install/app"
+Decompress CM package successfully.
+Successfully decompressed bin file.
+Modifying Alarm configuration.
+Modifying user's environmental variable $GAUSS_ENV.
+Successfully modified user's environmental variable $GAUSS_ENV.
+Fixing file permission.
+Set Cgroup config file to appPath.
+Successfully Set Cgroup.
+
+Successfully installed APP on nodes ['opengauss-db4'].
+success to send all CA file.
+Success to change user to [omm]
+Success to init instance on nodes ['opengauss-db4']
+Start to generate and send cluster static file.
+End to generate and send cluster static file.
+
+Ready to perform command on node [opengauss-db4]. Command is : source /home/omm/.bashrc;gs_guc set -D /opt/gaussdb/install/data/db1 -h 'host all omm 192.168.17.112/32 trust' -h 'host all all 192.168.17.112/32 sha256'
+Successfully set hba on all nodes.
+Success to change user to [omm]
+Stopping cluster.
+=========================================
+Successfully stopped cluster.
+=========================================
+End stop cluster.
+Remove dynamic_config_file and CM metadata directory on all nodes.
+Starting cluster.
+======================================================================
+Successfully started primary instance. Wait for standby instance.
+======================================================================
+.
+Successfully started cluster.
+======================================================================
+cluster_state : Normal
+redistributing : No
+node_count : 4
+Datanode State
+ primary : 1
+ standby : 3
+ secondary : 0
+ cascade_standby : 0
+ building : 0
+ abnormal : 0
+ down : 0
+
+Expansion results:
+192.168.17.112: Success
+
+-- 执行过程日志可查看 /opt/gaussdb/log/omm/pg_log/dn__xxx 目录下 postgresql 日志
+```
+
+#### 3.3 查询集群状态
+
+```powershell
+[root@opengauss-db1 script]# su - omm
+Last login: Sun Nov 13 21:37:57 CST 2022 on pts/4
+[omm@opengauss-db1 ~]$ cm_ctl query -v -C -i -d
+[ CMServer State ]
+
+node node_ip instance state
+------------------------------------------------------------------------------------
+1 opengauss-db1 192.168.17.113 1 /opt/gaussdb/install/data/cm/cm_server Primary
+2 opengauss-db2 192.168.17.139 2 /opt/gaussdb/install/data/cm/cm_server Standby
+3 opengauss-db3 192.168.17.159 3 /opt/gaussdb/install/data/cm/cm_server Standby
+4 opengauss-db4 192.168.17.112 4 /opt/gaussdb/install/data/cm/cm_server Standby
+
+[ Cluster State ]
+
+cluster_state : Normal
+redistributing : No
+balanced : Yes
+current_az : AZ_ALL
+
+[ Datanode State ]
+
+node node_ip instance state | node node_ip instance state | node node_ip instance state | node node_ip instance state
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+1 opengauss-db1 192.168.17.113 6001 /opt/gaussdb/install/data/db1 P Primary Normal | 2 opengauss-db2 192.168.17.139 6002 /opt/gaussdb/install/data/db1 S Standby Normal | 3 opengauss-db3 192.168.17.159 6003 /opt/gaussdb/install/data/db1 S Standby Normal | 4 opengauss-db4 192.168.17.112 6004 /opt/gaussdb/install/data/db1 S Standby Normal
+
+
+[omm@opengauss-db1 ~]$ gs_om -t status --detail
+[ CMServer State ]
+
+node node_ip instance state
+------------------------------------------------------------------------------------
+1 opengauss-db1 192.168.17.113 1 /opt/gaussdb/install/data/cm/cm_server Primary
+2 opengauss-db2 192.168.17.139 2 /opt/gaussdb/install/data/cm/cm_server Standby
+3 opengauss-db3 192.168.17.159 3 /opt/gaussdb/install/data/cm/cm_server Standby
+4 opengauss-db4 192.168.17.112 4 /opt/gaussdb/install/data/cm/cm_server Standby
+
+[ Cluster State ]
+
+cluster_state : Normal
+redistributing : No
+balanced : Yes
+current_az : AZ_ALL
+
+[ Datanode State ]
+
+node node_ip instance state
+-------------------------------------------------------------------------------------
+1 opengauss-db1 192.168.17.113 6001 /opt/gaussdb/install/data/db1 P Primary Normal
+2 opengauss-db2 192.168.17.139 6002 /opt/gaussdb/install/data/db1 S Standby Normal
+3 opengauss-db3 192.168.17.159 6003 /opt/gaussdb/install/data/db1 S Standby Normal
+4 opengauss-db4 192.168.17.112 6004 /opt/gaussdb/install/data/db1 S Standby Normal
+```
+
+#### 3.4 刷新动态配置文件
+
+```powershell
+-- 主节点 omm 用户操作
+[omm@opengauss-db1 ~]$ gs_om -t refreshconf
+Generating dynamic configuration file for all nodes.
+Successfully generated dynamic configuration file.
+```
+
+#### 3.5 数据测试
+
+```powershell
+-- 主节点
+[root@opengauss-db1 ~]# su - omm
+Last login: Mon Nov 14 10:14:24 CST 2022 on pts/5
+[omm@opengauss-db1 ~]$ gsql -d postgres -p 26000
+gsql ((openGauss 3.1.0 build 4e931f9a) compiled at 2022-09-29 14:19:24 commit 0 last mr )
+Non-SSL connection (SSL connection is recommended when requiring high-security)
+Type "help" for help.
+
+openGauss=# create table pgtb (id int, name text);
+CREATE TABLE
+openGauss=# insert into pgtb (id,name) values (10,'Jacky');
+INSERT 0 1
+openGauss=#
+
+-- 新增节点
+[omm@opengauss-db4 ~]$ gsql -d postgres -p 26000
+gsql ((openGauss 3.1.0 build 4e931f9a) compiled at 2022-09-29 14:19:24 commit 0 last mr )
+Non-SSL connection (SSL connection is recommended when requiring high-security)
+Type "help" for help.
+
+openGauss=# select * from pgtb;
+ id | name
+----+-------
+ 10 | Jacky
+(1 row)
+
+openGauss=# insert into pgtb (id,name) values (11,'shlei6067');
+ERROR: cannot execute INSERT in a read-only transaction
+openGauss=#
+```
+
+### 四、补充
+
+
+
+#### 4.1 扩容时报GAUSS-51100
+
+```powershell
+--问题现象
+主节点执行扩容时,报 [GAUSS-51100] : Failed to verify SSH trust on these nodes错误
+[root@opengauss-db1 openGauss]# ./script/gs_expansion -U omm -G dbgrp -X /opt/software/openGauss/clusterconfig.xml -h 192.168.17.112
+[GAUSS-51100] : Failed to verify SSH trust on these nodes:
+opengauss-db1, opengauss-db2, opengauss-db3, opengauss-db4, 192.168.17.113, 192.168.17.139, 192.168.17.159, 192.168.17.112 by root
+opengauss-db1, opengauss-db2, opengauss-db3, opengauss-db4, 192.168.17.113, 192.168.17.139, 192.168.17.159, 192.168.17.112 by individual user.
+
+-- 解决办法
+创建存放所有节点IP文件,分别在root用户及omm用户下参照3.1.2章节执行 gs_sshexkey 来配置节点间的互信,并分别测试互信
+可在主节点执行 /opt/gaussdb/gausstools/om/script/gspylib/pssh/bin/pssh -s -H 'pwd' 查看互信
+
+# gs_expansion文件倒数第二行expansion.checkTrust()是用来做互信校验的
+```
+
+#### 4.2 解析clusterconfig.xml报错
+
+```powershell
+-- 问题现象:
+主节点执行扩容时报如下错误:
+[root@opengauss-db1 script]# ./gs_expansion -U omm -G dbgrp -X /opt/software/openGauss/clusterconfig.xml -h 192.168.17.112
+Start expansion with cluster manager component.
+Start to send soft to each standby nodes.
+End to send soft to each standby nodes.
+Success to send XML to new nodes
+Start to perform perinstall on nodes: ['opengauss-db4']
+Preinstall command is: /tmp/gs_expansion_2022-11-13_21_21_21_185901/pkg/script/gs_preinstall -U omm -G dbgrp -X /opt/software/openGauss/clusterconfig.xml -L --non-interactive 2>&1
+Success to perform perinstall on nodes ['opengauss-db4']
+Success to change user to [omm]
+Installing applications on all new nodes.
+Install on new node output: [FAILURE] opengauss-db4:
+Using omm:dbgrp to install database.
+Using installation program path : /opt/gaussdb/install/app
+Command for creating symbolic link: ln -snf /opt/gaussdb/install/app_4e931f9a /opt/gaussdb/install/app.
+[GAUSS-51234] : The configuration file [/opt/software/openGauss/clusterconfig.xml] contains parsing errors. Error:
+[GAUSS-51236] : Failed to parsing xml. Error:
+[Errno 13] Permission denied: '/opt/software/openGauss/clusterconfig.xml'.
+
+Process Process-1:
+Traceback (most recent call last):
+ File "/usr/local/python3/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
+ self.run()
+ File "/usr/local/python3/lib/python3.6/multiprocessing/process.py", line 93, in run
+ self._target(*self._args, **self._kwargs)
+ File "/opt/software/openGauss/script/impl/expansion/expansion_impl_with_cm.py", line 446, in do_install
+ self.install_app()
+ File "/opt/software/openGauss/script/impl/expansion/expansion_impl_with_cm.py", line 172, in install_app
+ [key for key in result_map.keys() if result_map[key] == "Failure"])
+Exception: [GAUSS-52707] : Failed to install on ['opengauss-db4'].
+
+-- 解决办法:
+可将主节点clusterconfig.xml文件拷贝至新增备库相同目录节点下,并赋予omm用户读权限,参照 3.1.5 章节
+该问题主要是由于 3.1.0 版本在扩容时拷贝文件到新增节点,clusterconfig.xml 用户和属组都是 root,omm用户无法读该文件
+```
+
+#### 4.3 扩容时报GAUSS-51802
+
+```powershell
+-- 问题现象:
+[GAUSS-51802] : Failed to obtain the environment variable "GAUSSHOME", please import environment variable.
+
+-- 解决办法:
+主节点root用户执行 source /home/omm/.bashrc
+新增节点 omm 用户执行 source /home/omm/.bashrc
+```
+
+#### 4.4 扩容时报GAUSS-51800
+
+```powershell
+-- 问题现象:
+扩容时,报如下错误:
+[root@opengauss-db1 script]# source /home/omm/.bashrc
+[root@opengauss-db1 script]# ./script/gs_expansion -U omm -G dbgrp -X /opt/software/openGauss/clusterconfig.xml -h 192.168.17.112
+-bash: ./script/gs_expansion: No such file or directory
+[root@opengauss-db1 script]# ./gs_expansion -U omm -G dbgrp -X /opt/software/openGauss/clusterconfig.xml -h 192.168.17.112
+Start expansion with cluster manager component.
+Start to send soft to each standby nodes.
+End to send soft to each standby nodes.
+Success to send XML to new nodes
+Start to perform perinstall on nodes: ['opengauss-db4']
+Preinstall command is: /tmp/gs_expansion_2022-11-13_20_49_42_523008/pkg/script/gs_preinstall -U omm -G dbgrp -X /opt/software/openGauss/clusterconfig.xml -L --non-interactive 2>&1
+Success to perform perinstall on nodes ['opengauss-db4']
+Success to change user to [omm]
+Installing applications on all new nodes.
+Install on new node output: [FAILURE] opengauss-db4:
+Using omm:dbgrp to install database.
+Using installation program path : /opt/gaussdb/install/app
+[GAUSS-51800] : The environmental variable $GAUSSHOME is empty. or variable has exceeded maximum length
+
+Process Process-1:
+Traceback (most recent call last):
+ File "/usr/local/python3/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
+ self.run()
+ File "/usr/local/python3/lib/python3.6/multiprocessing/process.py", line 93, in run
+ self._target(*self._args, **self._kwargs)
+ File "/opt/software/openGauss/script/impl/expansion/expansion_impl_with_cm.py", line 446, in do_install
+ self.install_app()
+ File "/opt/software/openGauss/script/impl/expansion/expansion_impl_with_cm.py", line 172, in install_app
+ [key for key in result_map.keys() if result_map[key] == "Failure"])
+Exception: [GAUSS-52707] : Failed to install on ['opengauss-db4'].
+
+-- 解决办法:
+新增节点 omm 用户 修改 /home/omm/.bashrc ,取消或注释 GAUSS_ENV
+然后执行 source /home/omm/.bashrc 生效环境变量
+```
+
+#### 4.5 主节点/opt/gaussdb/gausstools/ 目录为空
+
+```powershell
+-- 问题现象:
+在扩容时,发现主节点 /opt/gaussdb/gausstools/ 目录为空
+
+-- 解决办法:
+使用 omm 用户 拷贝其它正常备库节点 /opt/gaussdb/gausstools/ 目录至 主节点 omm用户 /opt/gaussdb/gausstools/ 下
+```
+
diff --git "a/Centos 7.6 \345\256\211\350\243\205\351\203\250\347\275\262 openGauss 3.1.0 \344\274\201\344\270\232\347\211\210\344\270\200\344\270\273\344\270\244\345\244\207\351\233\206\347\276\244.md" "b/Centos 7.6 \345\256\211\350\243\205\351\203\250\347\275\262 openGauss 3.1.0 \344\274\201\344\270\232\347\211\210\344\270\200\344\270\273\344\270\244\345\244\207\351\233\206\347\276\244.md"
new file mode 100644
index 0000000000000000000000000000000000000000..23fc619e3133271c253bc20935484c9fa594a672
--- /dev/null
+++ "b/Centos 7.6 \345\256\211\350\243\205\351\203\250\347\275\262 openGauss 3.1.0 \344\274\201\344\270\232\347\211\210\344\270\200\344\270\273\344\270\244\345\244\207\351\233\206\347\276\244.md"
@@ -0,0 +1,946 @@
+### 一、安装环境设置
+
+#### 1.1 硬件环境
+
+
+
+| 名称 | 最低配置 | 建议配置 | 测试配置 |
+| :--------: | ------------------------------------------------------------ | -------- | :------: |
+| 服务器数量 | 3 | 略 | 略 |
+| 硬盘 | * 至少1GB用于安装openGauss的应用程序。
* 每个主机需大约300MB用于元数据存储。
* 预留70%以上的磁盘剩余空间用于数据存储。 | 略 | 略 |
+| 内存 | >=2G | 略 | 略 |
+| CPU | 功能调试最小1×8核,2.0GHz | 略 | 略 |
+| 网络 | 300兆以上以太网,生产建议采用bond | 略 | 略 |
+
+#### 1.2 软件环境
+
+| 软件类型 | 信息描述 |
+| ---------------- | ------------------------------------------------------------ |
+| 操作系统 | Centos 7.6 |
+| Linux文件系统 | 剩余inode个数 > 15亿(推荐) |
+| 工具 | bzip2 |
+| Python | * oepnEuler:支持Python 3.7.x
* Centos 7.6: 支持Python 3.6.x |
+| 数据库版本 | opengauss 3.1.0 企业版 |
+| 数据库软件包名称 | openGauss-3.1.0-CentOS-64bit-all.tar.gz |
+
+##### 1.2.1 安装python 3.6
+
+```powershell
+-- root用户(所有节点)
+# 本次选择安装python 3.6.5版本
+mkdir /usr/local/python3
+cd /usr/local/python3
+wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tgz
+tar -zxf Python-3.6.5.tgz
+cd /usr/local/python3/Python-3.6.5
+./configure --prefix=/usr/local/python3 --enable-shared CFLAGS=-fPIC
+make && make install
+ln -s /usr/local/python3/bin/python3 /usr/bin/python3
+ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3
+
+-- 设置环境变量
+cat >>/etc/profile<> /etc/ld.so.conf
+ldconfig
+
+-- 如遇如下报错
+python3: error while loading shared libraries: libpython3.6m.so.1.0: cannot open shared object file: No such file or directory
+可执行 cp /usr/local/python3/Python-3.6.5/libpython3.6m.so.1.0 /usr/lib64/
+```
+
+##### 1.2.2 安装软件依赖包
+
+###### 1.2.2.1 软件依赖要求
+
+| 所需软件 | 建议版本 |
+| :---------------------------- | :------------------------ |
+| libaio-devel | 建议版本:0.3.109-13 |
+| flex | 要求版本:2.5.31 以上 |
+| bison | 建议版本:2.7-4 |
+| ncurses-devel | 建议版本:5.9-13.20130511 |
+| glibc-devel | 建议版本:2.17-111 |
+| patch | 建议版本:2.7.1-10 |
+| redhat-lsb-core | 建议版本:4.1 |
+| readline-devel | 建议版本 :7.0-13 |
+| libnsl(openeuler+x86环境中) | 建议版本 :2.28-36 |
+
+###### 1.2.2.2 安装软件依赖包
+
+```powershell
+-- root用户 【所有节点】
+-- 安装依赖包
+yum install -y libaio-devel flex bison ncurses-devel glibc-devel patch redhat-lsb-core readline-devel zlib readline gcc perl-ExtUtils-Embed readline-devel zlib-devel expect
+
+-- 检查是否已安装
+rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep -E "libaio-devel|flex|bison|ncurses-devel|glibc-devel|patch|redhat-lsb-core|readline-devel|zlib|readline|gcc|python|python-devel|perl-ExtUtils-Embed|readline-devel|zlib-devel|expect"
+```
+
+##### 1.2.3 修改操作系统配置
+
+###### 1.2.3.1 修改操作系统参数
+
+```powershell
+-- root用户 【所有节点】
+-- 添加如下参数:
+cat>>/etc/sysctl.conf <> /etc/rc.d/rc.local< /sys/kernel/mm/transparent_hugepage/enabled
+fi
+if test -f /sys/kernel/mm/transparent_hugepage/defrag;
+ then
+ echo never > /sys/kernel/mm/transparent_hugepage/defrag
+fi
+EOF
+
+-- 查看是否关闭:
+cat /sys/kernel/mm/transparent_hugepage/enabled
+cat /sys/kernel/mm/transparent_hugepage/defrag
+```
+
+###### 1.2.3.3 关闭防火墙
+
+```powershell
+-- root用户 【所有节点】
+systemctl disable firewalld.service
+systemctl stop firewalld.service
+```
+
+###### 1.2.3.4 关闭selinux
+
+```powershell
+-- root用户 【所有节点】
+sed -i "s/SELINUX=enforcing/SELINUX=disabled/" /etc/selinux/config
+-- 检查
+cat /etc/selinux/config | grep disabled
+```
+
+###### 1.2.3.5 修改字符集
+
+```powershell
+-- root用户 【所有节点】
+cat>> /etc/profile<>/etc/ssh/sshd_config<>/etc/ssh/sshd_config<>/etc/resolv.conf<>/etc/resolv.conf<>/etc/resolv.conf< /etc/hosts<
+
+#### 3.2 上传及解压软件包
+
+
+
+```powershell
+-- 节点一 root 用户
+-- 创建存放安装包目录
+mkdir -p /opt/software/openGauss
+chmod 755 -R /opt/software
+
+-- 上传软件包
+# 上传openGauss-3.1.0-CentOS-64bit-all.tar.gz软件至/opt/software/openGauss目录
+# 解压软件包,解压openGauss-3.1.0-CentOS-64bit-all.tar.gz后需保留 .sha256文件,否则执行预检查时会报[GAUSS-50201] : The /opt/software/openGauss/openGauss-2.0.0-RedHat-64bit.sha256 does not exist.
+
+tar -zxvf openGauss-3.1.0-CentOS-64bit-all.tar.gz
+
+tar -zxvf openGauss-3.1.0-CentOS-64bit-om.tar.gz
+```
+
+#### 3.3 创建XML配置文件
+
+##### 3.3.1 配置XML文件
+
+```powershell
+-- 节点一 root 用户
+-- 在/opt/software/openGauss 目录下创建 clusterconfig.xml配置文件
+-- 执行操作如下
+cat > clusterconfig.xml<
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+EOF
+```
+
+##### 3.3.2 参数简介
+
+| 实例类型 | 参数 | 说明 |
+| :--------- | :----------------------------------------------------------- | :------- |
+| 整体信息 | name | 主机名称 |
+| azName | 指定azName(Available Zone Name),字符串(不能含有特殊字符),例如AZ1、AZ2、AZ3。 | |
+| azPriority | 指定azPriority的优先级。 | |
+| backIp1 | 主机在后端存储网络中的IP地址(内网IP)。所有openGauss主机使用后端存储网络通讯。 | |
+| sshIp1 | 设置SSH可信通道IP地址(外网IP)。若无外网,则可以不设置该选项或者同backIp1设置相同IP。 | |
+
+#### 3.4 初始化安装环境
+
+```powershell
+# root 用户 节点一操作
+
+-- 设置lib库
+export LD_LIBRARY_PATH=/opt/software/openGauss/script/gspylib/clib:$LD_LIBRARY_PATH
+
+-- 执行预执行
+python3 /opt/software/openGauss/script/gs_preinstall -U omm -G dbgrp -X /opt/software/openGauss/clusterconfig.xml
+# 预执行过程中,从日志来看是拷贝了software目录下文件到其它节点,将节点一的scripts下ssh-agent.sh拷贝到其它节点/root/.ssh/目录下,执行完并将其删除,创建了omm用户,每个节点/etc/profile下设置环境变量
+# 预执行详细执行过程可查看 /opt/gaussdb/log/omm/om 目录下
+
+# 执行过程可查看/opt/gaussdb/log/omm/om 目录下gs_preinstall日志文件gs_preinstall_xxx.log文件
+
+-- 预检查执行结果如下
+Parsing the configuration file.
+Successfully parsed the configuration file.
+Installing the tools on the local node.
+Successfully installed the tools on the local node.
+Are you sure you want to create trust for root (yes/no)?yes -- 输入 yes
+Please enter password for root
+Password: 输入 root 口令
+Successfully created SSH trust for the root permission user.
+Setting host ip env
+Successfully set host ip env.
+Distributing package.
+Begin to distribute package to tool path.
+Successfully distribute package to tool path.
+Begin to distribute package to package path.
+Successfully distribute package to package path.
+Successfully distributed package.
+Are you sure you want to create the user[omm] and create trust for it (yes/no)? yes -- 输入 yes
+Please enter password for cluster user.
+Password: -- 设置 omm 口令
+Please enter password for cluster user again.
+Password: -- 再次输入 omm 口令
+Generate cluster user password files successfully.
+
+Successfully created [omm] user on all nodes.
+Preparing SSH service.
+Successfully prepared SSH service.
+Installing the tools in the cluster.
+Successfully installed the tools in the cluster.
+Checking hostname mapping.
+Successfully checked hostname mapping.
+Creating SSH trust for [omm] user.
+Please enter password for current user[omm].
+Password: -- 输入 omm 口令
+Checking network information.
+All nodes in the network are Normal.
+Successfully checked network information.
+Creating SSH trust.
+Creating the local key file.
+Successfully created the local key files.
+Appending local ID to authorized_keys.
+Successfully appended local ID to authorized_keys.
+Updating the known_hosts file.
+Successfully updated the known_hosts file.
+Appending authorized_key on the remote node.
+Successfully appended authorized_key on all remote node.
+Checking common authentication file content.
+Successfully checked common authentication content.
+Distributing SSH trust file to all node.
+Distributing trust keys file to all node successfully.
+Successfully distributed SSH trust file to all node.
+Verifying SSH trust on all hosts.
+Successfully verified SSH trust on all hosts.
+Successfully created SSH trust.
+Successfully created SSH trust for [omm] user.
+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 opengauss-db1,opengauss-db2,opengauss-db3 --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@opengauss-db1 ~]# /opt/software/openGauss/script/gs_checkos -i A -h opengauss-db1,opengauss-db2,opengauss-db3 --detail
+-- 执行结果如下
+# 本次测试环境三台服务器,操作系统为 Centos 7.9, 系统内核为 3.10.0-693.el7.x86_64 曾经做过7.6系统的升级
+Checking items:
+ A1. [ OS version status ] : Normal
+ [opengauss-db3]
+ centos_7.9.2009_64bit
+ [opengauss-db2]
+ centos_7.9.2009_64bit
+ [opengauss-db1]
+ centos_7.9.2009_64bit
+
+ A2. [ Kernel version status ] : Warning
+ [opengauss-db1]
+ 3.10.0-957.27.2.el7.x86_64
+ [opengauss-db2]
+ 3.10.0-1160.76.1.el7.x86_64
+ [opengauss-db3]
+ 3.10.0-1160.76.1.el7.x86_64
+
+ A3. [ Unicode status ] : Normal
+ The values of all unicode are same. The value is "LANG=en_US.UTF-8".
+ A4. [ Time zone status ] : Normal
+ The informations about all timezones are same. The value is "+0800".
+ A5. [ Swap memory status ] : Normal
+ The value about swap memory is correct.
+ A6. [ System control parameters status ] : Warning
+ [opengauss-db1]
+ Warning reason: variable 'net.ipv4.ip_local_port_range' RealValue '1024 65000' ExpectedValue '26000 65535'.
+ Check_SysCtl_Parameter warning.
+
+ [opengauss-db2]
+ Warning reason: variable 'net.ipv4.ip_local_port_range' RealValue '1024 65000' ExpectedValue '26000 65535'.
+ Check_SysCtl_Parameter warning.
+
+ [opengauss-db3]
+ Warning reason: variable 'net.ipv4.ip_local_port_range' RealValue '1024 65000' ExpectedValue '26000 65535'.
+ Check_SysCtl_Parameter warning.
+
+
+ A7. [ File system configuration status ] : Warning
+ [opengauss-db1]
+ Warning reason: variable 'open files' RealValue '65536' ExpectedValue '1000000'
+ Warning reason: variable 'max user processes' RealValue '69632' ExpectedValue 'unlimited'
+
+ [opengauss-db2]
+ Warning reason: variable 'open files' RealValue '65536' ExpectedValue '1000000'
+ Warning reason: variable 'max user processes' RealValue '69632' ExpectedValue 'unlimited'
+
+ [opengauss-db3]
+ Warning reason: variable 'open files' RealValue '65536' ExpectedValue '1000000'
+ Warning reason: variable 'max user processes' RealValue '69632' ExpectedValue 'unlimited'
+
+
+ A8. [ Disk configuration status ] : Normal
+ The value about XFS mount parameters is correct.
+ A9. [ Pre-read block size status ] : Normal
+ The value about Logical block size is correct.
+ A10.[ IO scheduler status ] : Normal
+ The value of IO scheduler is correct.
+ A11.[ Network card configuration status ] : Warning
+ [opengauss-db1]
+BondMode Null
+ Warning reason: network 'ens33' 'mtu' RealValue '1500' ExpectedValue '8192' -- 可忽略
+
+ [opengauss-db2]
+BondMode Null
+ Warning reason: network 'ens33' 'mtu' RealValue '1500' ExpectedValue '8192' -- 可忽略
+
+ [opengauss-db3]
+BondMode Null
+ Warning reason: network 'ens33' 'mtu' RealValue '1500' ExpectedValue '8192' -- 可忽略
+
+
+ A12.[ Time consistency status ] : Warning
+ [opengauss-db1]
+ The NTPD not detected on machine and local time is "2022-11-09 11:53:23".
+ [opengauss-db2]
+ The NTPD not detected on machine and local time is "2022-11-09 11:53:23".
+ [opengauss-db3]
+ The NTPD not detected on machine and local time is "2022-11-09 11:53:24".
+
+ A13.[ Firewall service status ] : Normal
+ The firewall service is stopped.
+ A14.[ THP service status ] : Normal
+ The THP service is stopped.
+Total numbers:14. Abnormal numbers:0. Warning numbers:5.
+
+=============================================================================
+-- 根据执行detail命令结果对预检查告警进行调整
+-- 预检查过程中遇到的问题可参照 后文 附录 部分
+```
+
+#### 3.5 执行集群安装
+
+##### 3.5.1 修改属主
+
+```powershell
+-- 务必确保已在节点一执行预检查
+-- root 用户 节点一操作
+chmod -R 755 /opt/software/openGauss/script/
+chown -R omm:dbgrp /opt/software/openGauss/script/
+```
+
+##### 3.5.2 执行安装
+
+```powershell
+-- 节点一切换到omm用户执行
+su - omm
+-- 执行如下命令
+gs_install -X /opt/software/openGauss/clusterconfig.xml
+
+# 执行过程可查看/opt/gaussdb/log/omm/om及各节点/opt/gaussdb/log/omm/pg_log/ 下日志文件
+#
+
+[omm@opengauss-db1 ~]$ gs_install -X /opt/software/openGauss/clusterconfig.xml --gsinit-parameter="--encoding=UTF8"
+
+-- 执行结果如下
+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: -- 设置数据库 口令 如 Passw0rd@1234
+Please repeat for database: -- 再次输入相同口令
+begin to create CA cert files
+The sslcert will be generated in /opt/gaussdb/install/app/share/sslcert/om
+Create CA files for cm beginning.
+Create CA files on directory [/opt/gaussdb/install/app_4e931f9a/share/sslcert/cm]. file list: ['client.key.rand', 'server.crt', 'cacert.pem', 'client.crt', 'server.key.rand', 'client.key', 'client.key.cipher', 'server.key', 'server.key.cipher']
+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.
+Successful check consistence of memCheck and coresCheck on all nodes.
+Configuring pg_hba on all nodes.
+Configuration is completed.
+Starting cluster.
+======================================================================
+Successfully started primary instance. Wait for standby instance.
+======================================================================
+.
+Successfully started cluster.
+======================================================================
+cluster_state : Normal
+redistributing : No
+node_count : 3
+Datanode State
+ primary : 1
+ standby : 2
+ secondary : 0
+ cascade_standby : 0
+ building : 0
+ abnormal : 0
+ down : 0
+
+Successfully installed application.
+end deploy..
+```
+
+##### 3.5.3 数据库状态检查
+
+```postgresql
+-- omm用户
+[omm@opengauss-db1 ~]$ gs_om -t status --detail
+[ CMServer State ]
+
+node node_ip instance state
+------------------------------------------------------------------------------------
+1 opengauss-db1 192.168.17.113 1 /opt/gaussdb/install/data/cm/cm_server Primary
+2 opengauss-db2 192.168.17.139 2 /opt/gaussdb/install/data/cm/cm_server Standby
+3 opengauss-db3 192.168.17.159 3 /opt/gaussdb/install/data/cm/cm_server Standby
+
+[ Cluster State ]
+
+cluster_state : Normal
+redistributing : No
+balanced : Yes
+current_az : AZ_ALL
+
+[ Datanode State ]
+
+node node_ip instance state
+-------------------------------------------------------------------------------------
+1 opengauss-db1 192.168.17.113 6001 /opt/gaussdb/install/data/db1 P Primary Normal
+2 opengauss-db2 192.168.17.139 6002 /opt/gaussdb/install/data/db1 S Standby Normal
+3 opengauss-db3 192.168.17.159 6003 /opt/gaussdb/install/data/db1 S Standby Normal
+```
+
+
+
+##### 3.5.4 集群状态检查
+
+```powershell
+-- omm 用户
+[omm@opengauss-db1 ~]$ cm_ctl query -Cv
+[ CMServer State ]
+
+node instance state
+---------------------------------
+1 opengauss-db1 1 Primary
+2 opengauss-db2 2 Standby
+3 opengauss-db3 3 Standby
+
+[ Cluster State ]
+
+cluster_state : Normal
+redistributing : No
+balanced : Yes
+current_az : AZ_ALL
+
+[ Datanode State ]
+
+node instance state | node instance state | node instance state
+---------------------------------------------------------------------------------------------------------------------------------------
+1 opengauss-db1 6001 P Primary Normal | 2 opengauss-db2 6002 S Standby Normal | 3 opengauss-db3 6003 S Standby Normal
+```
+
+
+
+### 四、集群测试
+
+#### 4.1 主备数据验证测试
+
+```postgresql
+-- omm用户
+-- 主节点
+[omm@opengauss-db1 ~]$ gsql -d postgres -p 26000
+gsql ((openGauss 3.1.0 build 4e931f9a) compiled at 2022-09-29 14:19:24 commit 0 last mr )
+Non-SSL connection (SSL connection is recommended when requiring high-security)
+Type "help" for help.
+
+openGauss=# create table tb1 (id int, name text);
+CREATE TABLE
+openGauss=# insert into tb1 (id,name) values (10,'Jacky');
+INSERT 0 1
+openGauss=# commit;
+WARNING: there is no transaction in progress
+COMMIT
+openGauss=# \echo :AUTOCOMMIT -- 默认开启了自动提交
+on
+openGauss=#
+
+-- 备节点一
+[omm@opengauss-db2 ~]$ gsql -d postgres -p 26000
+gsql ((openGauss 3.1.0 build 4e931f9a) compiled at 2022-09-29 14:19:24 commit 0 last mr )
+Non-SSL connection (SSL connection is recommended when requiring high-security)
+Type "help" for help.
+
+openGauss=# select * from tb1;
+ id | name
+----+-------
+ 10 | Jacky
+(1 row)
+
+openGauss=# insert into tb1 (id,name) values (11,'shlei');
+ERROR: cannot execute INSERT in a read-only transaction
+openGauss=#
+
+-- 备节点二
+[omm@opengauss-db3 ~]$ gsql -d postgres -p 26000
+gsql ((openGauss 3.1.0 build 4e931f9a) compiled at 2022-09-29 14:19:24 commit 0 last mr )
+Non-SSL connection (SSL connection is recommended when requiring high-security)
+Type "help" for help.
+
+openGauss=# select * from tb1;
+ id | name
+----+-------
+ 10 | Jacky
+(1 row)
+
+openGauss=# insert into tb1 (id,name) values (11,'shlei');
+ERROR: cannot execute INSERT in a read-only transaction
+openGauss=#
+```
+
+#### 4.2 集群启停测试
+
+##### 4.2.1 停止集群
+
+```powershell
+-- omm 用户
+-- 停止集群
+[omm@opengauss-db1 ~]$ cm_ctl stop
+cm_ctl: stop cluster.
+cm_ctl: stop nodeid: 1
+cm_ctl: stop nodeid: 2
+cm_ctl: stop nodeid: 3
+..........
+cm_ctl: stop cluster successfully.
+
+-- 查看集群状态
+[omm@opengauss-db1 ~]$ cm_ctl query -Cv
+[ CMServer State ]
+
+node instance state
+---------------------------------
+1 opengauss-db1 1 Down
+2 opengauss-db2 2 Down
+3 opengauss-db3 3 Down
+
+cm_ctl: can't connect to cm_server.
+Maybe cm_server is not running, or timeout expired. Please try again.
+```
+
+
+
+##### 4.2.2 启动集群
+
+```powershell
+-- omm 用户
+-- 启动集群
+[omm@opengauss-db1 ~]$ cm_ctl start
+cm_ctl: checking cluster status.
+cm_ctl: checking cluster status.
+cm_ctl: checking finished in 901 ms.
+cm_ctl: start cluster.
+cm_ctl: start nodeid: 1
+cm_ctl: start nodeid: 2
+cm_ctl: start nodeid: 3
+.................
+cm_ctl: start cluster successfully.
+
+
+-- 查看集群状态
+[omm@opengauss-db1 ~]$ cm_ctl query -Cv
+[ CMServer State ]
+
+node instance state
+---------------------------------
+1 opengauss-db1 1 Primary
+2 opengauss-db2 2 Standby
+3 opengauss-db3 3 Standby
+
+[ Cluster State ]
+
+cluster_state : Normal
+redistributing : No
+balanced : Yes
+current_az : AZ_ALL
+
+[ Datanode State ]
+
+node instance state | node instance state | node instance state
+---------------------------------------------------------------------------------------------------------------------------------------
+1 opengauss-db1 6001 P Primary Normal | 2 opengauss-db2 6002 S Standby Normal | 3 opengauss-db3 6003 S Standby Normal
+```
+
+
+
+### 五、补充
+
+#### 5.1 初始化报expect命令未找到
+
+```powershell
+-- 如未安装expect包导致初始化预检查调用expect命令时报错,报错信息如下:
+[2022-11-09 11:13:42.081711][2196828][gs_sshexkey][DEBUG]:add ssh id_rsa output:/root/.ssh/./ssh-agent.sh: line 18: expect: command not found
+[2022-11-09 11:13:42.082355][2196828][gs_sshexkey][DEBUG]:Error: Failed to register other ssh-agent, output is [Failed to ssh-add perform.Error: /root/.ssh/./ssh-agent.sh: line 18: expect: command not found] for 2 times
+[2022-11-09 11:13:42.082573][2196828][gs_sshexkey][ERROR]:Error: Failed to register other ssh-agent,output is [Failed to ssh-add perform.Error: /root/.ssh/./ssh-agent.sh: line 18: expect: command not found]
+[2022-11-09 11:13:42.314059][2196716][gs_preinstall][ERROR]:[GAUSS-51632] : Failed to do gs_sshexkey.Error: Please enter password for current user[root].
+
+-- ssh-agent.sh脚本是openGauss自带脚本,内容为:
+#!/bin/bash
+#############################################################################
+# Copyright (c): 2021-2025, Huawei Tech. Co., Ltd.
+# FileName : ssh-agent
+# Version : V1.0.0
+# Date : 2020-01-13
+#############################################################################
+
+read -r secret
+id_rsa_path="$1"
+passwd=$secret
+cmd="ssh-add ${id_rsa_path}"
+func_remote_execute_cmd()
+{
+set timeout 5
+echo "Access Method"
+echo "ssh-agent command:$cmd"
+expect << EOF
+spawn $cmd
+expect {
+ "Enter passphrase for *" {send $passwd\n}
+ }
+expect {
+ "Bad passphrase*" {puts \"failure\";exit 2}
+ eof {puts \"success:eof\"\n }
+ }
+catch wait result
+puts \$result
+exit [lindex \$result 3]
+EOF
+}
+func_remote_execute_cmd
+
+-- 解决办法:使用yum 执行 yum install -y expect后重新执行预执行命令
+```
+
+
+
+#### 5.2 初始化报libpython.so文件未找到
+
+```powershell
+# 在预检查过程中,遇到如下一些报错
+
+报错一:
+[GAUSS-51400] : Failed to execute the command: rm -rf '/tmp/step_preinstall_file.dat'. Result:{'opengauss-node1': 'Failure', 'opengauss-node2': 'Failure'}.
+Error:
+[FAILURE] opengauss-node1:
+[FAILURE] opengauss-node2:
+
+[GAUSS-52200] : Unable to import module: libpython3.6m.so.1.0: cannot open shared object file: No such file or directory.
+
+-- 解决办法:
+重新编译python,或者在其它已编译该python版本环境将libpython3.6m.so.1.0拷贝到当前服务器/usr/lib64 目录下
+并在/etc/profile里执行 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/python3/bin,并source /etc/profile生效
+```
+
+#### 5.3 重新执行预执行失败
+
+```powershell
+-- 再次执行预执行时会因前一次预执行已创建了一些目录和文件,会导致失败。
+-- 解决办法:可参照xml文件,将除/opt/software/openGauss之外的其它目录和文件,最好将创建的omm用户和dbgrp组删除,重新再执行
+```
+
diff --git "a/content/zh/post/\345\260\232\351\233\267/.keep" "b/content/zh/post/\345\260\232\351\233\267/.keep"
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391