执行前置脚本准备好openGauss安装环境之后,按照启动安装过程部署openGauss。
前提条件
操作步骤
-
(可选)检查安装包和openGauss配置文件在规划路径下是否已存在。如果没有则需要重新上传一份,并解压和修改属主为omm。
cd /opt/software/openGauss/script chmod -R 755 /opt/software/openGauss/script chown -R omm:dbgrp /opt/software/openGauss/script -
登录到openGauss的主机,并切换到omm用户。
su - omm
说明:
- omm指的是前置脚本gs_preinstall中-U参数指定的用户。
- 安装脚本gs_install必须以前置脚本中指定的omm执行,否则,脚本执行会报错。 -
使用gs_install安装openGauss。若为环境变量分离的模式安装的集群需要source环境变量分离文件ENVFILE。
gs_install -X /opt/software/openGauss/clusterconfig.xml/opt/software/openGauss/clusterconfig.xml为openGauss配置文件的路径。
日志文件路径下会生成两个日志文件:“gs_install-YYYY-MMDD_HHMMSS.log”和“gs_local-YYYY-MM-DD_HHMMSS.log”。
说明:
执行gs_install脚本时,如果输入参数--autostart=no, 则工具脚本在配置(config)步骤完成后退出,不会自动启动openGauss,需要用户通过执行gs_om -t start命令手动启动。 -
安装执行成功之后,需要手动删除主机root用户的互信,即删除openGauss数据库各节点上的互信文件。
rm –rf ~/.ssh
安装生成的目录
安装后的目录及各目录下的文件说明请参见表1。
表 1 安装生成的目录
示例
执行安装:
omm@plat1:~> gs_install -X /opt/software/openGauss/clusterconfig.xml
Parsing the configuration file.
Check preinstall on every node.
Successfully checked preinstall on every node.
Creating the backup directory.
Successfully created the backup directory.
Installing the cluster.
Checking the installation environment on all nodes.
Installing applications on all nodes.
Successfully installed APP.
Cluster installation is completed.
Configuring.
Deleting instances from all nodes.
Checking node configuration on all nodes.
Initializing instances on all nodes.
Updating instance configuration on all nodes.
Configuring pg_hba on all nodes.
Configuration is completed.
Successfully started cluster.
Successfully installed application.
错误排查
如果安装失败请根据openGauss日志目录下的“gs_install-YYYY-MM-DD_HHMMSS.log”和“gs_local-YYYY-MM-DD_HHMMSS.log”中的日志信息排查错误。




