From 51824392f149ddf93bbda84d6b77b6ccc85e6e7a Mon Sep 17 00:00:00 2001 From: li-jun056 <1255728208@qq.com> Date: Mon, 10 Aug 2020 17:48:18 +0800 Subject: [PATCH] sync install --- ...66\345\256\203\351\200\211\351\241\271.md" | 4 +- ...15\347\275\256\346\226\207\344\273\266.md" | 3 +- ...57\345\242\203\346\270\205\347\220\206.md" | 8 +- ...11\350\243\205\346\265\201\347\250\213.md" | 4 +- ...73\347\273\237\351\205\215\347\275\256.md" | 2 + ...37\351\230\262\347\201\253\345\242\231.md" | 40 +++--- ...67\345\217\212\347\216\257\345\242\203.md" | 119 +++++------------- ...15\347\275\256\346\226\207\344\273\266.md" | 2 +- ...11\350\243\205\347\216\257\345\242\203.md" | 2 - ...15\347\275\256\346\226\207\344\273\266.md" | 3 +- .../\345\256\211\350\243\205openGauss.md" | 2 +- ...11\350\243\205\345\207\206\345\244\207.md" | 4 +- ...11\350\243\205\346\246\202\350\277\260.md" | 4 +- ...72\347\253\213\344\272\222\344\277\241.md" | 26 ++-- ...47\350\241\214\345\256\211\350\243\205.md" | 68 ++++++---- ...26\345\256\211\350\243\205\345\214\205.md" | 69 ++++++++++ ...34\347\250\213\347\231\273\345\275\225.md" | 8 +- ...72\345\222\214\346\227\266\351\227\264.md" | 8 +- ...347\275\221\345\215\241MTU\345\200\274.md" | 2 +- ...57\345\242\203\350\246\201\346\261\202.md" | 24 ++-- ...72\346\234\254\344\277\241\346\201\257.md" | 22 ++-- ...14\345\255\227\347\254\246\351\233\206.md" | 34 +++-- ...73\347\273\237\345\217\202\346\225\260.md" | 6 +- ...02\347\202\271\344\277\241\346\201\257.md" | 19 +-- ...04\351\241\271\347\233\256\345\275\225.md" | 16 +-- ...07\346\234\272\345\217\257\350\257\273.md" | 2 +- content/zh/menu/index.md | 70 +++++------ 27 files changed, 302 insertions(+), 269 deletions(-) create mode 100644 "content/zh/docs/installation/\350\216\267\345\217\226\345\256\211\350\243\205\345\214\205.md" diff --git "a/content/zh/docs/Developerguide/\345\205\266\345\256\203\351\200\211\351\241\271.md" "b/content/zh/docs/Developerguide/\345\205\266\345\256\203\351\200\211\351\241\271.md" index 0a7cd9773..74d7e126e 100644 --- "a/content/zh/docs/Developerguide/\345\205\266\345\256\203\351\200\211\351\241\271.md" +++ "b/content/zh/docs/Developerguide/\345\205\266\345\256\203\351\200\211\351\241\271.md" @@ -91,9 +91,11 @@ **参数说明:**报告当前数据库的服务端编码字符集。 +缺省情况下,gs_initdb会根据当前的系统环境初始化此参数,通过locale命令可以查看当前的配置环境。 + 该参数属于INTERNAL类型参数,为固定参数,用户无法修改此参数,只能查看。 -**默认值:**在创建数据库的时候决定的。 +**默认值:**在创建数据库的时候由当前系统环境决定的。 ## enable\_upgrade\_merge\_lock\_mode diff --git "a/content/zh/docs/installation/\344\270\200\344\270\273\344\270\200\345\244\207\351\205\215\347\275\256\346\226\207\344\273\266.md" "b/content/zh/docs/installation/\344\270\200\344\270\273\344\270\200\345\244\207\351\205\215\347\275\256\346\226\207\344\273\266.md" index 7cca3b048..49640a784 100644 --- "a/content/zh/docs/installation/\344\270\200\344\270\273\344\270\200\345\244\207\351\205\215\347\275\256\346\226\207\344\273\266.md" +++ "b/content/zh/docs/installation/\344\270\200\344\270\273\344\270\200\345\244\207\351\205\215\347\275\256\346\226\207\344\273\266.md" @@ -28,8 +28,9 @@ - + + diff --git "a/content/zh/docs/installation/\344\270\200\351\224\256\345\274\217\347\216\257\345\242\203\346\270\205\347\220\206.md" "b/content/zh/docs/installation/\344\270\200\351\224\256\345\274\217\347\216\257\345\242\203\346\270\205\347\220\206.md" index b4296df35..72c990ea0 100644 --- "a/content/zh/docs/installation/\344\270\200\351\224\256\345\274\217\347\216\257\345\242\203\346\270\205\347\220\206.md" +++ "b/content/zh/docs/installation/\344\270\200\351\224\256\345\274\217\347\216\257\345\242\203\346\270\205\347\220\206.md" @@ -34,16 +34,16 @@ 4. 使用gs\_postuninstall进行清理。若为环境变量分离的模式安装的集群需要source环境变量分离文件ENVFILE。 ``` - ./gs_postuninstall -U omm -X /opt/software/openGauss/clusterconfig.xml --delete-user --delete-group + ./gs_postuninstall -U omm -X /opt/software/openGauss/cluster_config.xml --delete-user --delete-group ``` 或者在openGauss中每个节点执行本地后置清理。 ``` - ./gs_postuninstall -U omm -X /opt/software/openGauss/clusterconfig.xml --delete-user --delete-group -L + ./gs_postuninstall -U omm -X /opt/software/openGauss/cluster_config.xml --delete-user --delete-group -L ``` - omm为运行openGauss的操作系统用户名,/opt/software/openGauss/clusterconfig.xml为openGauss配置文件路径。 + omm为运行openGauss的操作系统用户名,/opt/software/openGauss/cluster\_config.xml为openGauss配置文件路径。 若为环境变量分离的模式安装的集群需删除之前source的环境变量分离的env参数 @@ -56,7 +56,7 @@ 清理主机的环境 ``` -gs_postuninstall -U omm -X /opt/software/openGauss/clusterconfig.xml --delete-user +gs_postuninstall -U omm -X /opt/software/openGauss/cluster_config.xml --delete-user Parsing the configuration file. Successfully parsed the configuration file. Check log file path. diff --git "a/content/zh/docs/installation/\344\272\206\350\247\243\345\256\211\350\243\205\346\265\201\347\250\213.md" "b/content/zh/docs/installation/\344\272\206\350\247\243\345\256\211\350\243\205\346\265\201\347\250\213.md" index 72c78f6b1..223ebe59b 100644 --- "a/content/zh/docs/installation/\344\272\206\350\247\243\345\256\211\350\243\205\346\265\201\347\250\213.md" +++ "b/content/zh/docs/installation/\344\272\206\350\247\243\345\256\211\350\243\205\346\265\201\347\250\213.md" @@ -23,9 +23,9 @@ openGauss的安装流程如[图1](#fig18264185162412)所示。

更多信息,请参考安装准备

-

获取并校验安装包

+

获取安装包

-

安装包需要在官方网站上下载并且对安装包进行校验,详细请参见获取并校验安装包

+

安装包需要在openGauss开源社区下载并且对安装包内容进行检查,详细请参见。获取安装包

配置XML文件

diff --git "a/content/zh/docs/installation/\344\277\256\346\224\271\346\223\215\344\275\234\347\263\273\347\273\237\351\205\215\347\275\256.md" "b/content/zh/docs/installation/\344\277\256\346\224\271\346\223\215\344\275\234\347\263\273\347\273\237\351\205\215\347\275\256.md" index f1a91eb0e..46dd41c9e 100644 --- "a/content/zh/docs/installation/\344\277\256\346\224\271\346\223\215\344\275\234\347\263\273\347\273\237\351\205\215\347\275\256.md" +++ "b/content/zh/docs/installation/\344\277\256\346\224\271\346\223\215\344\275\234\347\263\273\347\273\237\351\205\215\347\275\256.md" @@ -10,4 +10,6 @@ - **[设置网卡MTU值](设置网卡MTU值.md)** +- **[配置操作系统参数](配置操作系统参数.md)** +openGauss要求各主机上的操作系统参数设置成一定的值,以满足系统运行的性能要求等。 diff --git "a/content/zh/docs/installation/\345\205\263\351\227\255\346\223\215\344\275\234\347\263\273\347\273\237\351\230\262\347\201\253\345\242\231.md" "b/content/zh/docs/installation/\345\205\263\351\227\255\346\223\215\344\275\234\347\263\273\347\273\237\351\230\262\347\201\253\345\242\231.md" index 98c9d3409..946da007b 100644 --- "a/content/zh/docs/installation/\345\205\263\351\227\255\346\223\215\344\275\234\347\263\273\347\273\237\351\230\262\347\201\253\345\242\231.md" +++ "b/content/zh/docs/installation/\345\205\263\351\227\255\346\223\215\344\275\234\347\263\273\347\273\237\351\230\262\347\201\253\345\242\231.md" @@ -57,24 +57,7 @@ 目前仅支持在防火墙关闭的状态下进行安装。 -1. 检查防火墙是否关闭。 - - ``` - systemctl status firewalld - ``` - - 若防火墙未关闭,请执行[2](#zh-cn_topic_0241802566_zh-cn_topic_0085434636_zh-cn_topic_0059782018_li11887129193617); - - 若防火墙已关闭,则无需再关闭防火墙。 - -2. 关闭防火墙。 - - ``` - systemctl disable firewalld.service - systemctl stop firewalld.service - ``` - -3. 修改/etc/selinux/config文件中的“SELINUX“值为“disabled“。 +1. 修改/etc/selinux/config文件中的“SELINUX“值为“disabled“。 1. 使用VIM打开config文件。 ``` @@ -87,11 +70,28 @@ SELINUX=disabled ``` -4. 重新启动操作系统。 +2. 重新启动操作系统。 ``` reboot ``` -5. 在其他主机上重复步骤1到步骤3。 +3. 检查防火墙是否关闭。 + + ``` + systemctl status firewalld + ``` + + 若防火墙未关闭,请执行[4](#li17330102819394); + + 若防火墙已关闭,则无需再关闭防火墙。 + +4. 关闭防火墙。 + + ``` + systemctl disable firewalld.service + systemctl stop firewalld.service + ``` + +5. 在其他主机上重复步骤1到步骤4。 diff --git "a/content/zh/docs/installation/\345\207\206\345\244\207\345\256\211\350\243\205\347\224\250\346\210\267\345\217\212\347\216\257\345\242\203.md" "b/content/zh/docs/installation/\345\207\206\345\244\207\345\256\211\350\243\205\347\224\250\346\210\267\345\217\212\347\216\257\345\242\203.md" index 2197b8359..2ae03866e 100644 --- "a/content/zh/docs/installation/\345\207\206\345\244\207\345\256\211\350\243\205\347\224\250\346\210\267\345\217\212\347\216\257\345\242\203.md" +++ "b/content/zh/docs/installation/\345\207\206\345\244\207\345\256\211\350\243\205\347\224\250\346\210\267\345\217\212\347\216\257\345\242\203.md" @@ -28,123 +28,61 @@ chmod 755 -R /opt/software ``` - >![](public_sys-resources/icon-note.gif) **说明:** - >- 不建议把安装包的存放目录规划到openGauss用户的家目录或其子目录下,可能导致权限问题。 - >- openGauss用户须具有/opt/software/openGauss目录的读写权限。 + >![](public_sys-resources/icon-note.gif) **说明:** + >- 不建议把安装包的存放目录规划到openGauss用户的家目录或其子目录下,可能导致权限问题。 + >- openGauss用户须具有/opt/software/openGauss目录的读写权限。 -2. 以release包为例,将安装包“openGauss\_x.x.x\_PACKAGES\_RELEASE.tar.gz”和配置文件“clusterconfig.xml”都上传至上一步所创建的目录中。 -3. 在安装包所在的目录下,解压安装包。 +2. 将安装包“openGauss-x.x.x-openEULER-64bit.tar.gz”和配置文件“cluster\_config.xml”都上传至上一步所创建的目录中。 +3. 在安装包所在的目录下,解压安装包openGauss-x.x.x-openEULER-64bit.tar.gz。安装包解压后,会在/opt/software/openGauss路径下自动生成script子目录,并且在script目录下生成gs\_preinstall等各种OM工具脚本。 ``` cd /opt/software/openGauss - tar -zxvf openGauss_x.x.x_PACKAGES_RELEASE.tar.gz - ``` - - 解压后的安装包说明见[表1](#zh-cn_topic_0241805803_zh-cn_topic_0085434653_zh-cn_topic_0059781995_te4a9d557337c400c85acff184476a722)。 - - **表 1** 安装包说明 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

包名

-

说明

-

openGauss-x.x.x-openEULER-64bit-ClientTools.tar.gz

-

用于Linux的客户端工具安装包。含gsql、dump restore tool、ODBC驱动、JDBC驱动、Libpq库。

-

openGauss-x.x.x-openEULER-64bit-Jdbc.tar.gz

-

用于Linux的JDBC驱动安装包。

-

openGauss-x.x.x-openEULER-64bit-Libpq.tar.gz

-

用于Linux的libpq库。

-

openGauss-x.x.x-openEULER-64bit-Odbc.tar.gz

-

用于Linux的ODBC驱动安装包。

-

openGauss-x.x.x-openEULER-64bit-symbol.tar.gz

-

用于调试和定位数据库问题的支持文件。

-

openGauss-x.x.x-openEULER-64bit.tar.gz

-

数据库管理系统安装包。即本手册使用的安装包。

-

openGauss-x.x.x-Sslcert.tar.gz

-

用于客户端服务器认证的证书。

-

openGauss-x.x.x-Inspection.tar.gz

-

用于检查数据库健康状况的巡检工具。

-
- -4. 对openGauss-x.x.x-openEULER-64bit.tar.gz进行解压。 - - ``` tar -zxvf openGauss-x.x.x-openEULER-64bit.tar.gz ``` - 安装包解压后,会在/opt/software/openGauss路径下自动生成script子目录,并且在script目录下生成gs\_preinstall等各种OM工具脚本。 - - >![](public_sys-resources/icon-note.gif) **说明:** - >- 在执行前置脚本gs\_preinstall时,需要规划好openGauss配置文件路径、安装包存放路径、程序安装目录、实例数据目录,后续普通用户使用过程中不能再更改这些路径。 - >- 运行前置脚本gs\_preinstall准备安装环境时,脚本内部会自动将openGauss配置文件、解压后的安装包同步拷贝到其余服务器的相同目录下。 - >- 在执行前置或者互信前,请检查/etc/profile文件中是否包含错误输出信息,如果存在错误输出,需手动处理。 + >![](public_sys-resources/icon-note.gif) **说明:** + >- 在执行前置脚本gs\_preinstall时,需要规划好openGauss配置文件路径、安装包存放路径、程序安装目录、实例数据目录,后续普通用户使用过程中不能再更改这些路径。 + >- 运行前置脚本gs\_preinstall准备安装环境时,脚本内部会自动将openGauss配置文件、解压后的安装包同步拷贝到其余服务器的相同目录下。 + >- 在执行前置或者互信前,请检查/etc/profile文件中是否包含错误输出信息,如果存在错误输出,需手动处理。 -5. 进入到工具脚本存放目录下。 +4. 进入到工具脚本存放目录下。 ``` cd /opt/software/openGauss/script ``` -6. 如果是openEuler的操作系统,执行如下命令打开performance.sh文件,用\#注释sysctl -w vm.min\_free\_kbytes=112640 &\> /dev/null,键入“ESC”键进入指令模式,执行**:wq**保存并退出修改。 +5. 如果是openEuler的操作系统,执行如下命令打开performance.sh文件,用\#注释sysctl -w vm.min\_free\_kbytes=112640 &\> /dev/null,键入“ESC”键进入指令模式,执行**:wq**保存并退出修改。 ``` vi /etc/profile.d/performance.sh ``` -7. 为确保openssl版本正确,执行预安装前请加载安装包中lib库。执行命令如下,其中_\{packagePath\}_为用户安装包放置的路径,本示例中为/opt/software/openGauss。 +6. 为确保openssl版本正确,执行预安装前请加载安装包中lib库。执行命令如下,其中_\{packagePath\}_为用户安装包放置的路径,本示例中为/opt/software/openGauss。 ``` export LD_LIBRARY_PATH={packagePath}/script/gspylib/clib:$LD_LIBRARY_PATH ``` -8. 为确保成功安装,检查 hostname 与 /etc/hostname 是否一致。预安装过程中,会对hostname进行检查。 -9. 使用gs\_preinstall准备好安装环境。若为共用环境需加入--sep-env-file=ENVFILE参数分离环境变量避免与其他用户相互影响,ENVFILE为用户自行指定的环境变量分离文件的路径。 +7. 为确保成功安装,检查 hostname 与 /etc/hostname 是否一致。预安装过程中,会对hostname进行检查。 +8. 使用gs\_preinstall准备好安装环境。若为共用环境需加入--sep-env-file=ENVFILE参数分离环境变量,避免与其他用户相互影响,ENVFILE为用户自行指定的环境变量分离文件的路径。 - 采用交互模式执行前置,并在执行过程中自动创建root用户互信和openGauss用户互信: ``` - ./gs_preinstall -U omm -G dbgrp -X /opt/software/openGauss/clusterconfig.xml + ./gs_preinstall -U omm -G dbgrp -X /opt/software/openGauss/cluster_config.xml ``` - omm为数据库管理员(也是运行openGauss的操作系统用户),dbgrp为运行openGauss的操作系统用户的群组名称,/opt/software/openGauss/clusterconfig.xml为openGauss配置文件路径。在执行过程中,用户根据提示选择是否创建互信,并输入root用户或openGauss用户的密码。 + omm为数据库管理员(也是运行openGauss的操作系统用户),dbgrp为运行openGauss的操作系统用户的群组名称,/opt/software/openGauss/cluster\_config.xml为openGauss配置文件路径。在执行过程中,用户根据提示选择是否创建互信,并输入root用户或openGauss用户的密码。 - 不允许创建root用户互信时,创建omm用户,在各主机上执行本地模式前置,然后用户手动创建openGauss用户互信:如果预安装指定-L参数,预安装前需手动将所有节点的主机名和ip映射关系,写入各个主机的/etc/hosts,并在每个映射关系后边加入注释内容:\#Gauss OM IP Hosts Mapping。 1. 执行下面命令准备安装环境。 ``` cd /opt/software/openGauss/script - ./gs_preinstall -U omm -G dbgrp -L -X /opt/software/openGauss/clusterconfig.xml + ./gs_preinstall -U omm -G dbgrp -L -X /opt/software/openGauss/cluster_config.xml ``` - >![](public_sys-resources/icon-note.gif) **说明:** - >此操作需要在每台主机上执行该命令。 + >![](public_sys-resources/icon-note.gif) **说明:** + >此操作需要在每台主机上执行该命令。 - 采用非交互模式执行前置: @@ -153,12 +91,12 @@ ``` cd /opt/software/openGauss/script - ./gs_preinstall -U omm -G dbgrp -X /opt/software/openGauss/clusterconfig.xml --non-interactive + ./gs_preinstall -U omm -G dbgrp -X /opt/software/openGauss/cluster_config.xml --non-interactive ``` - >![](public_sys-resources/icon-note.gif) **说明:** - >- 此模式要求用户确保在执行前,已经建立了各节点root用户互信和openGauss用户互信。 - >- root用户互信可能会存在安全隐患,因此建议用户在执行完安装后,立即删除各主机上root用户的互信。 + >![](public_sys-resources/icon-note.gif) **说明:** + >- 此模式要求用户确保在执行前,已经建立了各节点root用户互信和openGauss用户互信。 + >- root用户互信可能会存在安全隐患,因此建议用户在执行完安装后,立即删除各主机上root用户的互信。 @@ -168,7 +106,7 @@ 执行前置脚本: ``` -plat1:/opt/software/openGauss/script # ./gs_preinstall -U omm -G dbgrp -X /opt/software/openGauss/clusterconfig.xml +plat1:/opt/software/openGauss/script # ./gs_preinstall -U omm -G dbgrp -X /opt/software/openGauss/cluster_config.xml Parsing the configuration file. Successfully parsed the configuration file. Installing the tools on the local node. @@ -265,13 +203,12 @@ Fixing server package owner. Setting finish flag. Successfully set finish flag. Preinstallation succeeded. -S ``` root密码不一致也不能修改为一致,执行前置脚本本地安装模式: ``` -plat1:/opt/software/openGauss/script # ./gs_preinstall -U omm -G dbgrp -L -X /opt/software/openGauss/clusterconfig.xml +plat1:/opt/software/openGauss/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. @@ -308,7 +245,7 @@ Preinstallation succeeded. 以非交互模式执行前置: ``` -plat1:/opt/software/openGauss/script # ./gs_preinstall -U omm -G dbgrp -X /opt/software/openGauss/clusterconfig.xml --non-interactive +plat1:/opt/software/openGauss/script # ./gs_preinstall -U omm -G dbgrp -X /opt/software/openGauss/cluster_config.xml --non-interactive Parsing the configuration file. Successfully parsed the configuration file. Installing the tools on the local node. @@ -356,6 +293,6 @@ Preinstallation succeeded. 如果准备安装环境失败请根据openGauss日志目录“$GAUSSLOG/om”下的“gs\_preinstall-YYYY-MM-DD\_HHMMSS.log”和“gs\_local-YYYY-MM-DD\_HHMMSS.log”中的日志信息排查错误。例如配置文件中“gaussdbLogPath”参数指定的路径为“/var/log/gaussdb”,则“$GAUSSLOG/om”路径为“/var/log/gaussdb/omm/om”,omm用户为运行openGauss的用户。 ->![](public_sys-resources/icon-notice.gif) **须知:** ->准备安装用户及环境的过程中会使用root添加定时任务用于定时巡检和上报。 +>![](public_sys-resources/icon-notice.gif) **须知:** +>准备安装用户及环境的过程中会使用root添加定时任务用于定时巡检和上报。 diff --git "a/content/zh/docs/installation/\345\210\233\345\273\272XML\351\205\215\347\275\256\346\226\207\344\273\266.md" "b/content/zh/docs/installation/\345\210\233\345\273\272XML\351\205\215\347\275\256\346\226\207\344\273\266.md" index 975e8500d..a94db3067 100644 --- "a/content/zh/docs/installation/\345\210\233\345\273\272XML\351\205\215\347\275\256\346\226\207\344\273\266.md" +++ "b/content/zh/docs/installation/\345\210\233\345\273\272XML\351\205\215\347\275\256\346\226\207\344\273\266.md" @@ -1,6 +1,6 @@ # 创建XML配置文件 -安装openGauss前需要创建XML文件。XML文件包含部署openGauss的服务器信息、安装路径、IP地址以及端口号等。用于告知openGauss如何部署。用户需根据不同场配置对应的XML文件。 +安装openGauss前需要创建cluster\_config.xml文件。cluster\_config.xml文件包含部署openGauss的服务器信息、安装路径、IP地址以及端口号等。用于告知openGauss如何部署。用户需根据不同场配置对应的XML文件。 下面以一主一备的方案为例,说明如何创建XML配置文件。 diff --git "a/content/zh/docs/installation/\345\210\235\345\247\213\345\214\226\345\256\211\350\243\205\347\216\257\345\242\203.md" "b/content/zh/docs/installation/\345\210\235\345\247\213\345\214\226\345\256\211\350\243\205\347\216\257\345\242\203.md" index 50efc705f..15b8e169a 100644 --- "a/content/zh/docs/installation/\345\210\235\345\247\213\345\214\226\345\256\211\350\243\205\347\216\257\345\242\203.md" +++ "b/content/zh/docs/installation/\345\210\235\345\247\213\345\214\226\345\256\211\350\243\205\347\216\257\345\242\203.md" @@ -6,6 +6,4 @@ 创建完openGauss配置文件后,在执行安装前,为了后续能以最小权限进行安装及openGauss管理操作,保证系统安全性,需要运行安装前置脚本gs\_preinstall准备好安装用户及环境。 - **[手工建立互信](手工建立互信.md)** openGauss在安装过程中,需要在openGauss中的主机间执行命令,传送文件等操作。因此,在普通用户安装前需要确保互信是连通的。前置脚本中会先建立root用户间的互信,然后创建普通用户,并建立普通用户间的互信。 -- **[配置操作系统参数](配置操作系统参数.md)** -openGauss要求各主机上的操作系统参数设置成一定的值,以满足系统运行的性能要求等。 diff --git "a/content/zh/docs/installation/\345\215\225\350\212\202\347\202\271\351\205\215\347\275\256\346\226\207\344\273\266.md" "b/content/zh/docs/installation/\345\215\225\350\212\202\347\202\271\351\205\215\347\275\256\346\226\207\344\273\266.md" index da4120369..1f2ef0e7f 100644 --- "a/content/zh/docs/installation/\345\215\225\350\212\202\347\202\271\351\205\215\347\275\256\346\226\207\344\273\266.md" +++ "b/content/zh/docs/installation/\345\215\225\350\212\202\347\202\271\351\205\215\347\275\256\346\226\207\344\273\266.md" @@ -28,8 +28,9 @@ - + + diff --git "a/content/zh/docs/installation/\345\256\211\350\243\205openGauss.md" "b/content/zh/docs/installation/\345\256\211\350\243\205openGauss.md" index b44073284..c2e351e75 100644 --- "a/content/zh/docs/installation/\345\256\211\350\243\205openGauss.md" +++ "b/content/zh/docs/installation/\345\256\211\350\243\205openGauss.md" @@ -1,7 +1,7 @@ # 安装openGauss - **[创建XML配置文件](创建XML配置文件.md)** -安装openGauss前需要创建XML文件。XML文件包含部署openGauss的服务器信息、安装路径、IP地址以及端口号等。用于告知openGauss如何部署。用户需根据不同场配置对应的XML文件。 +安装openGauss前需要创建cluster\_config.xml文件。cluster\_config.xml文件包含部署openGauss的服务器信息、安装路径、IP地址以及端口号等。用于告知openGauss如何部署。用户需根据不同场配置对应的XML文件。 - **[初始化安装环境](初始化安装环境.md)** 为了保证openGauss的正确安装,请首先对主机环境进行配置。 - **[执行安装](执行安装.md)** diff --git "a/content/zh/docs/installation/\345\256\211\350\243\205\345\207\206\345\244\207.md" "b/content/zh/docs/installation/\345\256\211\350\243\205\345\207\206\345\244\207.md" index b01451593..889d96fa5 100644 --- "a/content/zh/docs/installation/\345\256\211\350\243\205\345\207\206\345\244\207.md" +++ "b/content/zh/docs/installation/\345\256\211\350\243\205\345\207\206\345\244\207.md" @@ -4,8 +4,8 @@ - **[了解安装流程](了解安装流程.md)** 本章节通过流程图简要介绍openGauss的安装流程。 -- **[获取并校验安装包](获取并校验安装包.md)** -为了防止安装包在传输过程中被恶意篡改或破坏给客户网络安全造成威胁,在获取到安装包后,需要对安装包的完整性进行校验,通过了校验的安装包才能部署。 +- **[获取安装包](获取安装包.md)** +openGauss开源社区上提供了安装包的获取方式。 - **[准备软硬件安装环境](准备软硬件安装环境.md)** 本章节描述安装前需要进行的环境准备。 - **[了解安装用户及用户组](了解安装用户及用户组.md)** diff --git "a/content/zh/docs/installation/\345\256\211\350\243\205\346\246\202\350\277\260.md" "b/content/zh/docs/installation/\345\256\211\350\243\205\346\246\202\350\277\260.md" index e719ec5b5..99f927790 100644 --- "a/content/zh/docs/installation/\345\256\211\350\243\205\346\246\202\350\277\260.md" +++ "b/content/zh/docs/installation/\345\256\211\350\243\205\346\246\202\350\277\260.md" @@ -4,6 +4,6 @@ openGauss支持单机部署和单机HA部署两种部署方式。单机部署时 单机部署和单机HA部署均支持精简模式和兼容模式。精简模式下,您可以安装openGauss数据库并正常使用;兼容模式是在精简模式的基础上做了兼容增强,安装兼容包后会兼容主流数据库的接口名称,便于习惯主流数据库的用户使用openGauss。 ->![](public_sys-resources/icon-note.gif) **说明:** ->通过openGauss提供的脚本安装时,只允许在单台物理机只部署一个数据库系统。如果您需要在单台物理机部署多个数据库系统,建议您通过命令行安装,不需要通过openGauss提供安装脚本执行安装。 +>![](public_sys-resources/icon-note.gif) **说明:** +>通过openGauss提供的脚本安装时,只允许在单台物理机只部署一个数据库系统。如果您需要在单台物理机部署多个数据库系统,建议您通过命令行安装,不需要通过openGauss提供安装脚本执行安装。 diff --git "a/content/zh/docs/installation/\346\211\213\345\267\245\345\273\272\347\253\213\344\272\222\344\277\241.md" "b/content/zh/docs/installation/\346\211\213\345\267\245\345\273\272\347\253\213\344\272\222\344\277\241.md" index 8eea5df88..ec0743be6 100644 --- "a/content/zh/docs/installation/\346\211\213\345\267\245\345\273\272\347\253\213\344\272\222\344\277\241.md" +++ "b/content/zh/docs/installation/\346\211\213\345\267\245\345\273\272\347\253\213\344\272\222\344\277\241.md" @@ -2,8 +2,8 @@ openGauss在安装过程中,需要在openGauss中的主机间执行命令,传送文件等操作。因此,在普通用户安装前需要确保互信是连通的。前置脚本中会先建立root用户间的互信,然后创建普通用户,并建立普通用户间的互信。 ->![](public_sys-resources/icon-notice.gif) **须知:** ->root用户互信可能会存在安全隐患,因此建议用户在使用完成后,立即删除各主机上root用户的互信。 +>![](public_sys-resources/icon-notice.gif) **须知:** +>root用户互信可能会存在安全隐患,因此建议用户在使用完成后,立即删除各主机上root用户的互信。 ## 前提条件 @@ -42,7 +42,7 @@ openGauss在安装过程中,需要在openGauss中的主机间执行命令, 1. 创建一个执行互信脚本所需要的输入文本,并在此文件中添加openGauss中所有主机IP。 ``` - plat1:/opt/software/hostfile> vim hostfile + plat1:/opt/software/openGauss> vim hostfile 192.168.0.1 192.168.0.2 192.168.0.3 @@ -62,8 +62,8 @@ openGauss在安装过程中,需要在openGauss中的主机间执行命令, 如果openGauss各主机的root密码不一致,gs\_preinstall脚本无法建立互信,可以手工建立互信。 ->![](public_sys-resources/icon-note.gif) **说明:** ->建立互信的过程中需要生成如下4个文件:authorized\_keys、id\_rsa、id\_rsa.pub、known\_hosts。请勿删除或破坏这些互信相关的文件。 +>![](public_sys-resources/icon-note.gif) **说明:** +>建立互信的过程中需要生成如下4个文件:authorized\_keys、id\_rsa、id\_rsa.pub、known\_hosts。请勿删除或破坏这些互信相关的文件。 手工建立信任关系,步骤如下,plat1,plat2,plat3是主机名: @@ -104,7 +104,7 @@ openGauss在安装过程中,需要在openGauss中的主机间执行命令, 2. 生成本机授权文件。 ``` - cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys + cat .ssh/id_rsa.pub >> ~/.ssh/authorized_keys ``` 示例如下: @@ -153,9 +153,9 @@ openGauss在安装过程中,需要在openGauss中的主机间执行命令, # plat3 SSH-2.0-OpenSSH_5.1 ``` - >![](public_sys-resources/icon-note.gif) **说明:** - >- 当远程主机的公钥被接受以后,它就会被保存在文件$HOME/.ssh/known\_hosts之中。下次再连接这台主机,系统就会认出它的公钥已经保存在本地了,从而跳过警告部分。 - >- 如果该主机上known\_hosts文件被删除,互信仍然可以使用,但是会有告警提示信息。如果需要规避告警提示信息,请将/etc/ssh/ssh\_config配置文件中,StrictHostKeyChecking参数设置为no。 + >![](public_sys-resources/icon-note.gif) **说明:** + >- 当远程主机的公钥被接受以后,它就会被保存在文件$HOME/.ssh/known\_hosts之中。下次再连接这台主机,系统就会认出它的公钥已经保存在本地了,从而跳过警告部分。 + >- 如果该主机上known\_hosts文件被删除,互信仍然可以使用,但是会有告警提示信息。如果需要规避告警提示信息,请将/etc/ssh/ssh\_config配置文件中,StrictHostKeyChecking参数设置为no。 3. 将互信文件分发到其它所有主机上。在本例中,需要将plat1上的互信文件分发到plat2和plat3上。 @@ -205,8 +205,8 @@ openGauss在安装过程中,需要在openGauss中的主机间执行命令, plat1:~ # ``` - >![](public_sys-resources/icon-note.gif) **说明:** - >如果三个以上节点,和上述过程类似。假设节点名为plat1、plat2、plat3、......。第一步,需要在plat1上生成root用户的本机授权文件;第二步,需要收集所有待建互信主机\(plat1、plat2、plat3、......\)的公钥并写入到本机known\_hosts文件中;第三步,需要将互信文件分发到除本机外的所有其它主机\(plat2、plat3、......\)上;第四步,检查互信是否建立成功。 + >![](public_sys-resources/icon-note.gif) **说明:** + >如果三个以上节点,和上述过程类似。假设节点名为plat1、plat2、plat3、......。第一步,需要在plat1上生成root用户的本机授权文件;第二步,需要收集所有待建互信主机\(plat1、plat2、plat3、......\)的公钥并写入到本机known\_hosts文件中;第三步,需要将互信文件分发到除本机外的所有其它主机\(plat2、plat3、......\)上;第四步,检查互信是否建立成功。 ## 删除root用户互信 @@ -235,7 +235,7 @@ openGauss在安装过程中,需要在openGauss中的主机间执行命令, root用户建立互信示例: ``` -plat1:~ # gs_sshexkey -f /opt/software/hostfile -W Gauss_234 +plat1:~ # gs_sshexkey -f /opt/software/hostfile -W Gauss_123 Checking network information. All nodes in the network are Normal. Successfully checked network information. @@ -260,7 +260,7 @@ Successfully created SSH trust. 普通用户建立互信示例: ``` -gaussdb@plat1:~ > gs_sshexkey -f /opt/software/hostfile -W Gauss_234 +gaussdb@plat1:~ > gs_sshexkey -f /opt/software/hostfile -W Gauss_123 Checking network information. All nodes in the network are Normal. Successfully checked network information. diff --git "a/content/zh/docs/installation/\346\211\247\350\241\214\345\256\211\350\243\205.md" "b/content/zh/docs/installation/\346\211\247\350\241\214\345\256\211\350\243\205.md" index 6ae8ccf91..680050f30 100644 --- "a/content/zh/docs/installation/\346\211\247\350\241\214\345\256\211\350\243\205.md" +++ "b/content/zh/docs/installation/\346\211\247\350\241\214\345\256\211\350\243\205.md" @@ -17,17 +17,17 @@ su - omm ``` - >![](public_sys-resources/icon-note.gif) **说明:** - >- omm指的是前置脚本gs\_preinstall中-U参数指定的用户。 - >- 安装脚本gs\_install必须以前置脚本中指定的omm执行,否则,脚本执行会报错。 + >![](public_sys-resources/icon-note.gif) **说明:** + >- omm指的是前置脚本gs\_preinstall中-U参数指定的用户。 + >- 安装脚本gs\_install必须以前置脚本中指定的omm执行,否则,脚本执行会报错。 3. 使用gs\_install安装openGauss。若为环境变量分离的模式安装的集群需要source环境变量分离文件ENVFILE。 ``` - gs_install -X /opt/software/openGauss/script/clusterconfig.xml + gs_install -X /opt/software/openGauss/cluster_config.xml ``` - /opt/software/openGauss/script/clusterconfig.xml为openGauss配置文件的路径。在执行过程中,用户需根据提示输入数据库的密码,密码具有一定的复杂度,为保证用户正常使用该数据库,请记住输入的数据库密码。 + /opt/software/openGauss/cluster\_config.xml为openGauss配置文件的路径。在执行过程中,用户需根据提示输入数据库的密码,密码具有一定的复杂度,为保证用户正常使用该数据库,请记住输入的数据库密码。 设置的密码要符合复杂度要求: @@ -39,8 +39,25 @@ 日志文件路径下会生成两个日志文件:“gs\_install-YYYY-MMDD\_HHMMSS.log”和“gs\_local-YYYY-MM-DD\_HHMMSS.log”。 - >![](public_sys-resources/icon-note.gif) **说明:** - >执行gs\_install脚本时,如果输入参数--autostart=no, 则工具脚本在配置(config)步骤完成后退出,不会自动启动openGauss,需要用户通过执行gs\_om -t start命令手动启动。 + >![](public_sys-resources/icon-note.gif) **说明:** + >- openGauss支持字符集的多种写法:gbk/GBK、UTF-8/UTF8/uft8/utf-8和Latine1/latine1。 + >- 安装时若不指定字符集,默认字符集为SQL\_ASCII,为简化和统一区域loacle默认设置为C,若想指定其他字符集和区域,请在安装时使用参数--gsinit-parameter="--locale=LOCALE"来指定,LOCALE为新数据库设置缺省的区域。 + > 例如用户要将数据库编码格式初始化为UTF-8,可以采用如下步骤: + > 用locale -a |grep utf8命令查看系统支持UTF-8编码的区域,如下: + > ``` + > omm@linux:~> locale -a|grep utf8 + > ``` + > 显示类似如下信息,其中en\_US.utf8表示区域en\_US支持UTF-8编码。 + > ``` + > ...... + > en_SG.utf8 + > en_US.utf8 + > ...... + > ``` + > 根据需要选择区域,如en\_US.utf8,初始化数据库时加入--locale=en\_US.utf8选项进行安装,示例如下: + > ``` + > gs_install -X /opt/software/openGauss/cluster_config.xml --gsinit-parameter="--locale=en_US.utf8" + > ``` 4. 安装执行成功之后,需要手动删除主机root用户的互信,即删除openGauss数据库各节点上的互信文件。 @@ -58,9 +75,9 @@ - - @@ -70,9 +87,9 @@ - - @@ -101,9 +118,9 @@ - - @@ -113,9 +130,9 @@ - - @@ -143,13 +160,13 @@ - - - - @@ -159,16 +176,25 @@ + + + + + +

序号

项目目录说明

+

项目目录说明

目录

+

目录

子目录

1

openGauss安装目录

+

openGauss安装目录

/opt/opengauss/app

+

/opt/huawei/install/app

bin

2

openGauss数据目录

+

openGauss数据目录

/opt/gaussdb/data

+

/opt/huawei/install/data/dn

data_dnxxx

3

openGauss日志目录

+

openGauss日志目录

/opt/opengauss/gaussdb_log/用户名

+

/var/log/omm/用户名

bin

数据库节点实例的运行日志目录。

4

+

4

openGauss系统工具目录

+

openGauss系统工具目录

/opt/opengauss/tool

+

/opt/huawei/install/om

script

+

script

用于openGauss用户进行openGauss管理的脚本文件。

bin目录下的二进制文件依赖的库文件。

5

+

openGauss临时文件目录

+

/opt/huawei/tmp

+
  

用于放置临时文件

+
- ## 示例 执行安装: ``` -omm@plat1:~> gs_install -X /opt/software/openGauss/script/clusterconfig.xml +omm@plat1:~> gs_install -X /opt/software/openGauss/cluster_config.xml Parsing the configuration file. Check preinstall on every node. Successfully checked preinstall on every node. diff --git "a/content/zh/docs/installation/\350\216\267\345\217\226\345\256\211\350\243\205\345\214\205.md" "b/content/zh/docs/installation/\350\216\267\345\217\226\345\256\211\350\243\205\345\214\205.md" new file mode 100644 index 000000000..6ed654f07 --- /dev/null +++ "b/content/zh/docs/installation/\350\216\267\345\217\226\345\256\211\350\243\205\345\214\205.md" @@ -0,0 +1,69 @@ +# 获取安装包 + +openGauss开源社区上提供了安装包的获取方式。 + +## 操作步骤 + +1. 从openGauss开源社区下载对应平台的安装包。 + 1. 通过[https://opengauss.org/zh/download.html](https://opengauss.org/zh/download.html)登录openGauss开源社区。用户可根据安装包说明[表1](#zh-cn_topic_0241805803_zh-cn_topic_0085434653_zh-cn_topic_0059781995_te4a9d557337c400c85acff184476a722)按需下载。 + + **图1** 开源网站openGauss Server页面 + + ![](figures/zh-cn_image_0260397375.png) + + **图2** 开源网站openGauss Connectors页面 + + ![](figures/zh-cn_image_0260397341.png) + + **表 1** openGauss Connectors安装包说明 + + + + + + + + + + + + + + + + +

安装包名称

+

说明

+

JDBC

+

用于Linux的JDBC驱动安装包。

+

ODBC

+

用于Linux的ODBC驱动安装包。

+

libpq

+

用于Linux的libpq库。

+
+ + 2. 选择所需安装包单击“下载”。 + 3. 解压下载后的压缩包。 + +2. 检查安装包。 + + 解压安装包,检查安装目录及文件是否齐全。在安装包所在目录执行以下命令: + + ``` + tar -zxvf openGauss-x.x.x-openEuler-64bit.tar.gz + ls -1 + ``` + + 执行ls命令,显示类似如下信息: + + ``` + total 50M + drwxr-xr-x 14 root root 4.0K Jul 6 11:03 lib + -rw-r--r-- 1 root root 65 Jul 6 11:03 openGauss-x.x.x-openEuler-64bit.sha256 + -rw-r--r-- 1 root root 50M Jul 6 11:03 openGauss-x.x.x-openEuler-64bit.tar.bz2 + drwxr-xr-x 5 root root 4.0K Jul 6 11:03 script + -rw-r--r-- 1 root root 32 Jul 6 11:03 version.cfg + + ``` + + diff --git "a/content/zh/docs/installation/\350\256\276\347\275\256root\347\224\250\346\210\267\350\277\234\347\250\213\347\231\273\345\275\225.md" "b/content/zh/docs/installation/\350\256\276\347\275\256root\347\224\250\346\210\267\350\277\234\347\250\213\347\231\273\345\275\225.md" index 3558f80c2..c0c1e96de 100644 --- "a/content/zh/docs/installation/\350\256\276\347\275\256root\347\224\250\346\210\267\350\277\234\347\250\213\347\231\273\345\275\225.md" +++ "b/content/zh/docs/installation/\350\256\276\347\275\256root\347\224\250\346\210\267\350\277\234\347\250\213\347\231\273\345\275\225.md" @@ -45,8 +45,8 @@ service sshd restart ``` - >![](public_sys-resources/icon-caution.gif) **注意:** - >若执行命令后返回提示信息“Redirecting to /bin/systemctl restart sshd.service”,请执行命令:/bin/systemctl restart sshd.service。 + >![](public_sys-resources/icon-caution.gif) **注意:** + >若执行命令后返回提示信息“Redirecting to /bin/systemctl restart sshd.service”,请执行命令:/bin/systemctl restart sshd.service。 4. 以root用户身份重新登录。 @@ -54,7 +54,7 @@ ssh xxx.xxx.xxx.xxx ``` - >![](public_sys-resources/icon-note.gif) **说明:** - >xxx.xxx.xxx.xxx为安装openGauss环境的ip。 + >![](public_sys-resources/icon-note.gif) **说明:** + >xxx.xxx.xxx.xxx为安装openGauss环境的ip。 diff --git "a/content/zh/docs/installation/\350\256\276\347\275\256\346\227\266\345\214\272\345\222\214\346\227\266\351\227\264.md" "b/content/zh/docs/installation/\350\256\276\347\275\256\346\227\266\345\214\272\345\222\214\346\227\266\351\227\264.md" index aee4af15c..f7b750558 100644 --- "a/content/zh/docs/installation/\350\256\276\347\275\256\346\227\266\345\214\272\345\222\214\346\227\266\351\227\264.md" +++ "b/content/zh/docs/installation/\350\256\276\347\275\256\346\227\266\345\214\272\345\222\214\346\227\266\351\227\264.md" @@ -6,8 +6,8 @@ cp /usr/share/zoneinfo/$地区/$时区 /etc/localtime ``` ->![](public_sys-resources/icon-note.gif) **说明:** ->_$地区/$时区为需要设置时区的信息,例如:Asia_/Shanghai。 +>![](public_sys-resources/icon-note.gif) **说明:** +>_$地区/$时区为需要设置时区的信息,例如:Asia_/Shanghai。 使用date -s命令将各主机的时间设置为统一时间,举例如下。 @@ -15,6 +15,6 @@ cp /usr/share/zoneinfo/$地区/$时区 /etc/localtime date -s Mon May 11 16:42:11 CST 2020 ``` ->![](public_sys-resources/icon-note.gif) **说明:** ->可以通过date命令查询主机时区。 +>![](public_sys-resources/icon-note.gif) **说明:** +>可以通过date命令查询主机时区。 diff --git "a/content/zh/docs/installation/\350\256\276\347\275\256\347\275\221\345\215\241MTU\345\200\274.md" "b/content/zh/docs/installation/\350\256\276\347\275\256\347\275\221\345\215\241MTU\345\200\274.md" index ae863617c..b197dc9e3 100644 --- "a/content/zh/docs/installation/\350\256\276\347\275\256\347\275\221\345\215\241MTU\345\200\274.md" +++ "b/content/zh/docs/installation/\350\256\276\347\275\256\347\275\221\345\215\241MTU\345\200\274.md" @@ -1,6 +1,6 @@ # 设置网卡MTU值 -将各数据库节点的网卡MTU值设置为相同大小。MTU值推荐8192,要求不小于1500 +将各数据库节点的网卡MTU值设置为相同大小。对于X86,MTU值推荐1500;对于ARM,MTU值推荐8192。 ``` ifconfig 网卡编号 mtu 值 diff --git "a/content/zh/docs/installation/\350\275\257\347\241\254\344\273\266\347\216\257\345\242\203\350\246\201\346\261\202.md" "b/content/zh/docs/installation/\350\275\257\347\241\254\344\273\266\347\216\257\345\242\203\350\246\201\346\261\202.md" index 5418a5060..3795de162 100644 --- "a/content/zh/docs/installation/\350\275\257\347\241\254\344\273\266\347\216\257\345\242\203\350\246\201\346\261\202.md" +++ "b/content/zh/docs/installation/\350\275\257\347\241\254\344\273\266\347\216\257\345\242\203\350\246\201\346\261\202.md" @@ -15,9 +15,9 @@ -

最小内存

+

内存

-

功能调试32GB以上。

+

功能调试建议32GB以上。

性能测试和商业部署时,单实例部署建议128GB以上。

复杂的查询对内存的需求量比较高,在高并发场景下,可能出现内存不足。此时建议使用大内存的机器,或使用负载管理限制系统的并发。

@@ -52,30 +52,30 @@ **表 2** 软件环境要求 -

软件类型

+ - - - - - - - - - diff --git "a/content/zh/docs/installation/\351\205\215\347\275\256Host\345\237\272\346\234\254\344\277\241\346\201\257.md" "b/content/zh/docs/installation/\351\205\215\347\275\256Host\345\237\272\346\234\254\344\277\241\346\201\257.md" index bfc329c65..18061bbc3 100644 --- "a/content/zh/docs/installation/\351\205\215\347\275\256Host\345\237\272\346\234\254\344\277\241\346\201\257.md" +++ "b/content/zh/docs/installation/\351\205\215\347\275\256Host\345\237\272\346\234\254\344\277\241\346\201\257.md" @@ -1,7 +1,7 @@ # 配置Host基本信息 ->![](public_sys-resources/icon-note.gif) **说明:** ->每台Host服务器都必须有如下信息,如下示例以node1为例。 +>![](public_sys-resources/icon-note.gif) **说明:** +>每台Host服务器都必须有如下信息,如下示例以node1为例。 加粗字体内容为示例,可自行替换。每行信息均有注释进行说明。 @@ -40,7 +40,7 @@ -

软件类型

配置描述

+

配置描述

Linux操作系统

+

Linux操作系统

openEuler 20.3LTS和CentOS 7.6

+

openEuler 20.3LTS和CentOS 7.6

Linux文件系统

+

Linux文件系统

剩余inode个数 > 15亿(推荐)

+

剩余inode个数 > 15亿(推荐)

工具

+

工具

Huawei JDK 1.8.0、bzip2

+

bzip2

Python

+

Python

  • openEuler:支持Python 3.7.X
  • CentOS:支持Python 3.6.X
+
  • openEuler:支持Python 3.7.X
  • CentOS:支持Python 3.6.X

azName

指定azName,字符串(不能含有特殊字符),例如AZ1、AZ2、AZ3。

+

指定azName(Available Zone Name),字符串(不能含有特殊字符),例如AZ1、AZ2、AZ3。

azPriority

@@ -61,12 +61,12 @@
->![](public_sys-resources/icon-note.gif) **说明:** ->配置文件中所有IP参数(包含backIp、sshIp、listenIp等)均只支持配置一个IP。如果配置第二个IP参数,则不会读取第二个参数的配置值。 ->示例:xml配置文件中同时配置backIp1和backIp2参数: ->在解析配置文件时仅读取backIp1参数的配置值,不会读取backIp2参数的配置值。 ->``` -> -> ->``` +>![](public_sys-resources/icon-note.gif) **说明:** +>配置文件中所有IP参数(包含backIp、sshIp、listenIp等)均只支持配置一个IP。如果配置第二个IP参数,则不会读取第二个参数的配置值。 +>示例:xml配置文件中同时配置backIp1和backIp2参数: +>在解析配置文件时仅读取backIp1参数的配置值,不会读取backIp2参数的配置值。 +>``` +> +> +>``` diff --git "a/content/zh/docs/installation/\351\205\215\347\275\256\345\214\272\345\237\237\345\222\214\345\255\227\347\254\246\351\233\206.md" "b/content/zh/docs/installation/\351\205\215\347\275\256\345\214\272\345\237\237\345\222\214\345\255\227\347\254\246\351\233\206.md" index 79202b517..9d0e31bdb 100644 --- "a/content/zh/docs/installation/\351\205\215\347\275\256\345\214\272\345\237\237\345\222\214\345\255\227\347\254\246\351\233\206.md" +++ "b/content/zh/docs/installation/\351\205\215\347\275\256\345\214\272\345\237\237\345\222\214\345\255\227\347\254\246\351\233\206.md" @@ -7,12 +7,12 @@ 区域: - 区域是指应用中考虑字母、排序、数字格式等与文化相关的问题。 -- 使用gs\_install脚本初始化一个数据库时会初始化区域。缺省时,gs\_install脚本将会按照操作系统默认的区域初始化数据库。因此,如果操作系统的默认区域与用户规划的相同,则初始化数据库时不需要再设置。 +- 使用gs\_install脚本初始化一个数据库时会初始化区域。缺省时,gs\_install脚本将会指定C区域为默认区域来初始化数据库。因此,如果安装的默认区域与用户规划的相同,则初始化数据库时不需要再设置。 字符集(编码格式): - openGauss支持GBK、UTF-8和Latin1编码格式。 -- 使用gs\_install脚本初始化数据库时会初始化字符集。缺省时,gs\_install脚本将会按照操作系统默认区域的字符集来初始化数据库。在创建数据库的时候是可以修改默认字符集。因此,多个数据库可以设置为不同的字符集。 +- 使用gs\_install脚本初始化数据库时会初始化字符集。缺省时,gs\_install脚本将会指定SQL\_ASCII字符集来初始化数据库,初始化完数据库不能再对数据库服务端字符集进行修改。但在创建数据库的时候是可以修改默认字符集。因此,多个数据库可以设置为不同的字符集。 ## 规划原则和方法 @@ -50,9 +50,9 @@
- >![](public_sys-resources/icon-note.gif) **说明:** - >- openGauss支持字符集的多种写法:gbk/GBK、UTF-8/UTF8/uft8/utf-8和Latine1/latine1。 - >- 安装时若不指定字符集,默认字符集为SQL\_ASCII,若想指定,请在安装时指定,具体操作请参见[示例](#zh-cn_topic_0241805810_zh-cn_topic_0085434664_zh-cn_topic_0059782037_sa523d6a2a09c4cf29d503e2175747721)。 + >![](public_sys-resources/icon-note.gif) **说明:** + >- openGauss支持字符集的多种写法:gbk/GBK、UTF-8/UTF8/uft8/utf-8和Latine1/latine1。 + >- 安装时若不指定字符集,默认字符集为SQL\_ASCII,若想指定,请在安装时指定,具体操作请参见[示例](#zh-cn_topic_0241805810_zh-cn_topic_0085434664_zh-cn_topic_0059782037_sa523d6a2a09c4cf29d503e2175747721)。 - 规划区域。 1. 检查与指定字符集(假设为UTF-8)匹配的区域。 @@ -75,25 +75,33 @@ ## 示例 -示例1:在初始化数据库时,指定数据库初始化的字符集为UTF-8,区域为zh\_CN.UTF-8。 +示例1:初始化新的数据库系统 + +1.以操作系统用户omm登录数据库主节点,进入数据目录"/opt/huawei/install/data",创建新的目录"data\_dn2",确保该数据目录所有权分配给数据库用户omm,所属用户组为omm用户所属的用户组。 + +``` +mkdir /opt/huawei/install/data/data_dn2 +``` + +2.执行gs\_initdb命令初始化新的数据库,指定数据库初始化的字符集为UTF-8,区域为zh\_CN.UTF-8。 ``` -gs_initdb -E UTF-8 --locale=zh_CN.UTF-8 /opt/gaussdb/data/data_n1 --nodename dn1 -w "Bigdata@123" +gs_initdb -E UTF-8 --locale=zh_CN.UTF-8 -D /opt/huawei/install/data/data_dn2 --nodename dn2 -w "Bigdata@123" ``` -/opt/gaussdb/data/data\_n1为安装后的DBnode目录,Bigdata@123为数据库用户密码。 +/opt/huawei/install/data/data\_dn2为初始化新数据库的数据目录路径,Bigdata@123为数据库用户密码。 显示类似如下信息: ``` -The files belonging to this database system will be owned by user "xlnha". +The files belonging to this database system will be owned by user "omm". This user must also own the server process. The database cluster will be initialized with locale "zh_CN.UTF-8". gs_initdb: could not find suitable text search configuration for locale "zh_CN.UTF-8" The default text search configuration will be set to "simple". -fixing permissions on existing directory /opt/gaussdb/data1 ... ok +fixing permissions on existing directory /opt/huawei/install/data/data_dn2 ... ok creating subdirectories ... ok selecting default max_connections ... 100 selecting default shared_buffers ... 32MB @@ -101,10 +109,12 @@ creating configuration files ... ok ...... ``` -示例2:使用SQL语句创建数据库时,指定数据库的字符集为GBK。 +示例2:使用SQL创建新的数据库 + +使用SQL语句创建数据库时,指定数据库的字符集为GBK。 ``` -gsql -d postgres -p 1255 +gsql -d postgres -p 15400 ``` ``` diff --git "a/content/zh/docs/installation/\351\205\215\347\275\256\346\223\215\344\275\234\347\263\273\347\273\237\345\217\202\346\225\260.md" "b/content/zh/docs/installation/\351\205\215\347\275\256\346\223\215\344\275\234\347\263\273\347\273\237\345\217\202\346\225\260.md" index cfb977316..8f5dda3f1 100644 --- "a/content/zh/docs/installation/\351\205\215\347\275\256\346\223\215\344\275\234\347\263\273\347\273\237\345\217\202\346\225\260.md" +++ "b/content/zh/docs/installation/\351\205\215\347\275\256\346\223\215\344\275\234\347\263\273\347\273\237\345\217\202\346\225\260.md" @@ -497,7 +497,7 @@ vim /etc/security/limits.d/90-nproc.conf ->![](public_sys-resources/icon-notice.gif) **须知:** ->- 网卡参数配置功能只针对万兆及万兆以上级别的业务网卡。即backIp1所绑定的网卡。 ->- 设置网卡参数的命令只有在设置成功后,才会被写入系统启动文件。执行失败的信息会被记入后台日志中。 +>![](public_sys-resources/icon-notice.gif) **须知:** +>- 网卡参数配置功能只针对万兆及万兆以上级别的业务网卡。即backIp1所绑定的网卡。 +>- 设置网卡参数的命令只有在设置成功后,才会被写入系统启动文件。执行失败的信息会被记入后台日志中。 diff --git "a/content/zh/docs/installation/\351\205\215\347\275\256\346\225\260\346\215\256\345\272\223\344\270\273\350\212\202\347\202\271\344\277\241\346\201\257.md" "b/content/zh/docs/installation/\351\205\215\347\275\256\346\225\260\346\215\256\345\272\223\344\270\273\350\212\202\347\202\271\344\277\241\346\201\257.md" index 86a0d7952..11ee8175c 100644 --- "a/content/zh/docs/installation/\351\205\215\347\275\256\346\225\260\346\215\256\345\272\223\344\270\273\350\212\202\347\202\271\344\277\241\346\201\257.md" +++ "b/content/zh/docs/installation/\351\205\215\347\275\256\346\225\260\346\215\256\345\272\223\344\270\273\350\212\202\347\202\271\344\277\241\346\201\257.md" @@ -8,7 +8,7 @@ - + @@ -26,7 +26,7 @@ -

DBnode

+

DBnode

dataNum

@@ -38,24 +38,12 @@

数据库节点的基础端口号,默认值40000。

-

dataListenIp1

- -

监听的IP地址,用于接受其他数据库节点的连接。未设置时,使用对应主机上的backIp1生成。

-

如果配置有虚拟IP,该字段也可配置虚拟IP。

- - -

dataHaIp1

- -

主、备DBnode通信的IP地址。未设置时,使用对应主机的backIp生成。

-

value中需设置主、备DBnode所在主机的IP地址。

- -

dataNode1

用于指定当前主机上的数据库节点的数据存储目录。此目录为数据库的数据存储目录。应规划到数据盘上。

-

dataNode1_syncNum

+

dataNode1_syncNum

可选参数,用于指定当前集群中同步模式的节点数目。取值范围为0~数据库备机节点数。

@@ -87,4 +75,3 @@ - diff --git "a/content/zh/docs/installation/\351\205\215\347\275\256\346\225\260\346\215\256\345\272\223\345\220\215\347\247\260\345\217\212\345\220\204\351\241\271\347\233\256\345\275\225.md" "b/content/zh/docs/installation/\351\205\215\347\275\256\346\225\260\346\215\256\345\272\223\345\220\215\347\247\260\345\217\212\345\220\204\351\241\271\347\233\256\345\275\225.md" index 3679a9f7b..d472e4496 100644 --- "a/content/zh/docs/installation/\351\205\215\347\275\256\346\225\260\346\215\256\345\272\223\345\220\215\347\247\260\345\217\212\345\220\204\351\241\271\347\233\256\345\275\225.md" +++ "b/content/zh/docs/installation/\351\205\215\347\275\256\346\225\260\346\215\256\345\272\223\345\220\215\347\247\260\345\217\212\345\220\204\351\241\271\347\233\256\345\275\225.md" @@ -1,6 +1,6 @@ # 配置数据库名称及各项目录 -加粗字体内容为示例,可自行替换。每行信息均有注释进行说明。 +在script/gspylib/etc/conf/cluster\_config\_template.xml获取XML文件模板。加粗字体内容为示例,可自行替换。每行信息均有注释进行说明。 ``` @@ -28,13 +28,13 @@ ``` ->![](public_sys-resources/icon-notice.gif) **须知:** ->- “/opt/huawei/install/om”存放互信等工具,避免权限问题,不要把实例数据目录放在此目录下。 ->- 安装目录和数据目录需为空或者不存在,否则可能导致安装失败。 ->- 在对数据库节点的实例进行具体配置时,需确保配置的目录之间不相互耦合。即各个配置目录不关联,删除其中任意一个目录,不会级联删除其它目录。如gaussdbAppPath为"/opt/huawei/install/app",gaussdbLogPath为"/opt/huawei/install/app/omm"。当gaussdbAppPath目录被删除时,会级联删除gaussdbLogPath目录,从而引起其它问题。 ->- 若需要安装脚本自动创建安装用户时各配置的目录需保证不与系统创建的默认用户目录耦合关联。 ->- 配置openGauss路径和实例路径时,路径中不能包含"|",";","&","$","<","\>","\`","\\\\","'","\\"","\{","\}","\(","\)","\[","\]","\~","\*","?"特殊字符。 ->- 配置数据库节点名称时,请通过hostname命令获取数据库节点的主机名称,替换示例中的node1,node2。 +>![](public_sys-resources/icon-notice.gif) **须知:** +>- “/opt/huawei/install/om”存放互信等工具,避免权限问题,不要把实例数据目录放在此目录下。 +>- 安装目录和数据目录需为空或者不存在,否则可能导致安装失败。 +>- 在对数据库节点的实例进行具体配置时,需确保配置的目录之间不相互耦合。即各个配置目录不关联,删除其中任意一个目录,不会级联删除其它目录。如gaussdbAppPath为"/opt/huawei/install/app",gaussdbLogPath为"/opt/huawei/install/app/omm"。当gaussdbAppPath目录被删除时,会级联删除gaussdbLogPath目录,从而引起其它问题。 +>- 若需要安装脚本自动创建安装用户时各配置的目录需保证不与系统创建的默认用户目录耦合关联。 +>- 配置openGauss路径和实例路径时,路径中不能包含"|",";","&","$","<","\>","\`","\\\\","'","\\"","\{","\}","\(","\)","\[","\]","\~","\*","?"特殊字符。 +>- 配置数据库节点名称时,请通过hostname命令获取数据库节点的主机名称,替换示例中的node1,node2。 **表 1** 参数说明 diff --git "a/content/zh/docs/installation/\357\274\210\345\217\257\351\200\211\357\274\211\350\256\276\347\275\256\345\244\207\346\234\272\345\217\257\350\257\273.md" "b/content/zh/docs/installation/\357\274\210\345\217\257\351\200\211\357\274\211\350\256\276\347\275\256\345\244\207\346\234\272\345\217\257\350\257\273.md" index cd1c4483f..445845a30 100644 --- "a/content/zh/docs/installation/\357\274\210\345\217\257\351\200\211\357\274\211\350\256\276\347\275\256\345\244\207\346\234\272\345\217\257\350\257\273.md" +++ "b/content/zh/docs/installation/\357\274\210\345\217\257\351\200\211\357\274\211\350\256\276\347\275\256\345\244\207\346\234\272\345\217\257\350\257\273.md" @@ -5,6 +5,6 @@ ## 操作步骤 1. 如果主备机上的openGauss数据库实例正在运行,请先分别停止主备机上的数据库实例。 -2. 根据[表2](配置数据库主节点信息.md#zh-cn_topic_0241802596_table15838192510429)对应路径,分别打开主机与备机的postgres.conf配置文件,找到并将对应参数修改为:wal\_level=hot\_standby ;hot\_standby = on;hot\_standby\_feedback = on。 +2. 根据[表2](配置数据库主节点信息.md#zh-cn_topic_0241802596_table15838192510429)对应路径,分别打开主机与备机的postgres.conf配置文件,找到并将对应参数修改为:wal\_level=hot\_standby;hot\_standby = on;hot\_standby\_feedback = on。 3. 修改完成后,分别启动主备机即可。 diff --git a/content/zh/menu/index.md b/content/zh/menu/index.md index d6b1c4706..39d20f06c 100644 --- a/content/zh/menu/index.md +++ b/content/zh/menu/index.md @@ -234,41 +234,41 @@ headless: true - [用户在openGauss节点间的互信丢失]({{< relref "./docs/Quickstart/用户在openGauss节点间的互信丢失.md" >}}) - [安装指南]({{< relref "./docs/Installation/Installation.md" >}}) - - [安装概述]({{< relref "./docs/Installation/安装概述.md" >}}) - - [安装准备]({{< relref "./docs/Installation/安装准备.md" >}}) - - [了解安装流程]({{< relref "./docs/Installation/了解安装流程.md" >}}) - - [获取并校验安装包]({{< relref "./docs/Installation/获取并校验安装包.md" >}}) - - [准备软硬件安装环境]({{< relref "./docs/Installation/准备软硬件安装环境.md" >}}) - - [软硬件环境要求]({{< relref "./docs/Installation/软硬件环境要求.md" >}}) - - [修改操作系统配置]({{< relref "./docs/Installation/修改操作系统配置.md" >}}) - - [关闭操作系统防火墙]({{< relref "./docs/Installation/关闭操作系统防火墙.md" >}}) - - [设置字符集参数]({{< relref "./docs/Installation/设置字符集参数.md" >}}) - - [设置时区和时间]({{< relref "./docs/Installation/设置时区和时间.md" >}}) - - [关闭swap交换内存]({{< relref "./docs/Installation/关闭swap交换内存.md" >}}) - - [设置网卡MTU值]({{< relref "./docs/Installation/设置网卡MTU值.md" >}}) - - [设置root用户远程登录]({{< relref "./docs/Installation/设置root用户远程登录.md" >}}) - - [了解安装用户及用户组]({{< relref "./docs/Installation/了解安装用户及用户组.md" >}}) - - [安装openGauss]({{< relref "./docs/Installation/安装openGauss.md" >}}) - - [创建XML配置文件]({{< relref "./docs/Installation/创建XML配置文件.md" >}}) - - [配置数据库名称及各项目录]({{< relref "./docs/Installation/配置数据库名称及各项目录.md" >}}) - - [配置Host基本信息]({{< relref "./docs/Installation/配置Host基本信息.md" >}}) - - [配置数据库主节点信息]({{< relref "./docs/Installation/配置数据库主节点信息.md" >}}) - - [示例]({{< relref "./docs/Installation/示例.md" >}}) - - [单节点配置文件]({{< relref "./docs/Installation/单节点配置文件.md" >}}) - - [一主一备配置文件]({{< relref "./docs/Installation/一主一备配置文件.md" >}}) - - [初始化安装环境]({{< relref "./docs/Installation/初始化安装环境.md" >}}) - - [准备安装用户及环境]({{< relref "./docs/Installation/准备安装用户及环境.md" >}}) - - [手工建立互信]({{< relref "./docs/Installation/手工建立互信.md" >}}) - - [配置操作系统参数]({{< relref "./docs/Installation/配置操作系统参数.md" >}}) - - [执行安装]({{< relref "./docs/Installation/执行安装.md" >}}) - - [(可选)设置备机可读]({{< relref "./docs/Installation/(可选)设置备机可读.md" >}}) - - [安装验证]({{< relref "./docs/Installation/安装验证.md" >}}) - - [检查健康状态]({{< relref "./docs/Installation/检查健康状态.md" >}}) - - [初始配置]({{< relref "./docs/Installation/初始配置.md" >}}) - - [配置区域和字符集]({{< relref "./docs/Installation/配置区域和字符集.md" >}}) - - [卸载openGauss]({{< relref "./docs/Installation/卸载openGauss.md" >}}) - - [执行卸载]({{< relref "./docs/Installation/执行卸载.md" >}}) - - [一键式环境清理]({{< relref "./docs/Installation/一键式环境清理.md" >}}) + - [安装概述]({{< relref "./docs/Installation/安装概述.md" >}}) + - [安装准备]({{< relref "./docs/Installation/安装准备.md" >}}) + - [了解安装流程]({{< relref "./docs/Installation/了解安装流程.md" >}}) + - [获取安装包]({{< relref "./docs/Installation/获取安装包.md" >}}) + - [准备软硬件安装环境]({{< relref "./docs/Installation/准备软硬件安装环境.md" >}}) + - [软硬件环境要求]({{< relref "./docs/Installation/软硬件环境要求.md" >}}) + - [修改操作系统配置]({{< relref "./docs/Installation/修改操作系统配置.md" >}}) + - [关闭操作系统防火墙]({{< relref "./docs/Installation/关闭操作系统防火墙.md" >}}) + - [设置字符集参数]({{< relref "./docs/Installation/设置字符集参数.md" >}}) + - [设置时区和时间]({{< relref "./docs/Installation/设置时区和时间.md" >}}) + - [关闭swap交换内存]({{< relref "./docs/Installation/关闭swap交换内存.md" >}}) + - [设置网卡MTU值]({{< relref "./docs/Installation/设置网卡MTU值.md" >}}) + - [配置操作系统参数]({{< relref "./docs/Installation/配置操作系统参数.md" >}}) + - [设置root用户远程登录]({{< relref "./docs/Installation/设置root用户远程登录.md" >}}) + - [了解安装用户及用户组]({{< relref "./docs/Installation/了解安装用户及用户组.md" >}}) + - [安装openGauss]({{< relref "./docs/Installation/安装openGauss.md" >}}) + - [创建XML配置文件]({{< relref "./docs/Installation/创建XML配置文件.md" >}}) + - [配置数据库名称及各项目录]({{< relref "./docs/Installation/配置数据库名称及各项目录.md" >}}) + - [配置Host基本信息]({{< relref "./docs/Installation/配置Host基本信息.md" >}}) + - [配置数据库主节点信息]({{< relref "./docs/Installation/配置数据库主节点信息.md" >}}) + - [示例]({{< relref "./docs/Installation/示例.md" >}}) + - [单节点配置文件]({{< relref "./docs/Installation/单节点配置文件.md" >}}) + - [一主一备配置文件]({{< relref "./docs/Installation/一主一备配置文件.md" >}}) + - [初始化安装环境]({{< relref "./docs/Installation/初始化安装环境.md" >}}) + - [准备安装用户及环境]({{< relref "./docs/Installation/准备安装用户及环境.md" >}}) + - [手工建立互信]({{< relref "./docs/Installation/手工建立互信.md" >}}) + - [执行安装]({{< relref "./docs/Installation/执行安装.md" >}}) + - [(可选)设置备机可读]({{< relref "./docs/Installation/(可选)设置备机可读.md" >}}) + - [安装验证]({{< relref "./docs/Installation/安装验证.md" >}}) + - [检查健康状态]({{< relref "./docs/Installation/检查健康状态.md" >}}) + - [卸载openGauss]({{< relref "./docs/Installation/卸载openGauss.md" >}}) + - [执行卸载]({{< relref "./docs/Installation/执行卸载.md" >}}) + - [一键式环境清理]({{< relref "./docs/Installation/一键式环境清理.md" >}}) + - [初始配置]({{< relref "./docs/Installation/初始配置.md" >}}) + - [配置区域和字符集]({{< relref "./docs/Installation/配置区域和字符集.md" >}}) - [管理员指南]({{< relref "./docs/Administratorguide/Administratorguide.md" >}}) - [启停openGauss]({{< relref "./docs/Administratorguide/启停openGauss.md" >}}) -- Gitee