暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

华为openGauss gs_install

华为高斯 2020-06-01
2494

背景信息

数据库的部署是一个复杂的过程。openGauss提供了gs_install工具来帮助完成openGauss的安装和部署。

openGauss安装部署,要求用户指定配置文件,配置文件中会指定程序安装路径、实例数据目录、主备关系、实例数、各实例的业务IP端口等信息。

前提条件

  • 已成功执行前置脚本gs_preinstall。
  • 用户需确保各个节点上的locale保持一致。
  • 需要使用前置时设置的openGauss用户进行安装操作。

语法

  • 安装openGauss

    gs_install -X XMLFILE [--gsinit-parameter="PARAMETER" [...]] [--dn-guc="PARAMETER" [...]] [--alarm-component=ALARMCOMPONENT] [--time-out=SECS] [-l LOGFILE]

    说明:
    执行gs_install脚本时,如果输入参数--autostart=no, 则工具脚本在配置(config)步骤完成后退出,不会自动启动openGauss,需要用户通过执行gs_om -t start命令手动启动。

  • 显示帮助信息

    gs_install -? | --help

  • 显示版本号信息

    gs_install -V | --version

参数说明

  • -X

    openGauss配置文件的路径。

    取值范围:xml文件的存储路径。

  • -l

    指定安装日志文件及日志文件存放的路径。

    当既不明确指定-l,又不在XML文件中配置gaussdbLogPath时,默认值为“$GAUSSLOG/om/gs_install-YYYY-MM-DD_hhmmss.log”;

    当不明确指定-l,但在XML文件中配置了gaussdbLogPath时,默认值为“gaussdbLogPath的值、用户名和om/gs_install-YYYY-MM-DD_hhmmss.log”的组合。

  • --gsinit-parameter=PARAM

    数据实例参数指定。

    取值范围请参见zh-cn_topic_0242223705.md的参数说明,其中对-A、-D、-U、-C、-X参数的设置不生效。

  • --dn-guc=PARAM

    配置参数。

    取值范围请参见gs_guc的参数说明。

  • --time-out=SECS

    启动超时等待时间。单位:s。

    若--time-out取值过小,有可能会因为需要启动的实例数过多而引起超时。若在超时时间内启动不成功,则会报错启动超时,但是openGauss会在后台继续启动。可以等待一段时间后,查询openGauss状态,检查openGauss是否启动成功。

    取值范围:正整数,若无特殊需求,不需要配置该参数,系统会自动调整超时时间。

  • --alarm-component=alarm_component

    指定告警上报组件的绝对路径。

  • --autostart=yes|no

    用来指定openGauss配置完成后是否启动。

    • yes:启动openGauss。
    • no:不启动openGauss。
  • -?, --help

    显示帮助信息。

  • -V, --version

    显示版本号信息。

示例

使用gs_install脚本进行openGauss安装。

gs_install -X /opt/software/openGauss/clusterconfig.xml Parsing the configuration file. Creating the backup directory. Successfully created the backup directory. Installing the cluster. Checking the installation environment on all nodes. Installing applications on all nodes. 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. Starting. =====================================================================Starting cluster. ====================================================================== Successfully started primary instance. Wait for standby instance. ====================================================================== . Successfully started cluster. ====================================================================== cluster_state : Normal redistributing : No node_count : 3 Coordinator State normal : 2 abnormal : 0 GTM State primary : 1 standby : 1 abnormal : 0 down : 0 Datanode State primary : 3 standby : 3 secondary : 3 building : 0 abnormal : 0 down : 0

相关命令

gs_postuninstallgs_preinstallgs_uninstall

「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论

文集目录
暂无数据