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

华为GaussDB T gs_install

墨天轮 2019-09-28
530

gs_install

数据库的部署是一个复杂的过程,分布式数据库的安装和部署更是复杂。GaussDB 100提供了gs_install工具来帮助完成集群的安装和部署。

前提条件

  • 已成功执行前置脚本gs_preinstall。
  • 用户需确保各个节点上的locale保持一致。
  • 需要使用前置时设置的集群用户进行安装操作。
  • 保证安装集群的各主机时间一致,主机相差时间不可超过2秒。

背景信息

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

语法

  • 安装集群
    gs_install -X XMLFILE [--autostart=yes|no] [-l LOGFILE]
    说明:
    • 执行gs_install脚本时,如果输入参数--autostart=no, 则工具脚本在配置(config)步骤完成后退出,不会自动启动集群,需要用户通过执行gs_om -t start命令手动启动。
  • 显示帮助信息
    gs_install -? | --help
  • 显示版本号信息
    gs_install -V | --version

参数说明

  • -X

    集群配置文件的路径。

    取值范围:clusterconfig.xml的文件路径。

    说明:

    执行gs_install脚本时,必须输入参数-X,后面跟安装集群的配置文件。

  • -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”的组合。

  • --autostart=yes|no

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

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

    显示帮助信息。

  • -V,--version

    显示版本号信息。

示例

使用gs_install安装集群。

omm@plat1:/opt/software/gaussdb/script> gs_install -X /opt/software/gaussdb/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. Check the time difference between hosts in the cluster. Installing the cluster. Installing applications on all nodes. Successfully installed APP. Distribute etcd communication keys. Successfully distrbute etcd communication keys. Initializing cluster instances ....144s Initializing cluster instances is completed. Configuring standby datanode. .....65s Successfully configure datanode. Cluster installation is completed. Configuring. Load cluster configuration file. Configuring the cluster. Successfully configuring the cluster. Configuration is completed. Start cm agent. Successfully start cm agent and ETCD in cluster. Starting the cluster. ============================================== ...........11s Successfully starting the cluster. ==============================================

相关命令

gs_uninstall,gs_postuninstall,gs_preinstall

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

评论