文档中心MogDBMogDB StackUqbar
v1.1

文档:v1.1

支持的版本:

ptk install

安装 MogDB 或 Uqbar 数据库集群

语法

ptk install [flags]

示例

# Simplest command to install the database (require network)
# It will download latest MogDB installation package from internet and deploy to target hosts
ptk install -f <CONFIG.yml>

# If you have previously performed checkos command and fixed them,
# you can skip unnecessary secondary checks by adding the '-skip-check-os' parameter
ptk install -f <CONFIG.yml> --skip-check-os

# If you do not want to interact during the installation process
# you can specify '-y' to accept all questions automatically
ptk install -f <CONFIG.yml> -y

# If your machine is unable to connect to the Internet,
# you can install it by specifying a local database package
ptk install -f <CONFIG.yml> -p <LOCAL_DB_PACKAGE>

# If you want to install the cm component, you can specify the '--install-cm' parameter
ptk install -f <CONFIG.yml> --install-cm

# Of course, you can freely combine multiple parameters to meet specific usage scenarios
ptk install -f <CONFIG.yml> -p <LOCAL_DB_PACKAGE> -y --skip-check-os --comment 'greate db'

# There are many other parameters in the ptk install command. We look forward to your exploration and discovery.

选项

-y, --assumeyes

  • 说明: 自动对所有提问回复 Yes
  • 数据类型: bool
  • 默认值: false

--comment string

  • 说明: 为当前集群添加备注信息
  • 数据类型: string
  • 默认值: ""

--cpu string

  • 说明: 指定CPU型号名

可通过 'ptk candidate cpu' 来查看支持的CPU型号名列表

  • 数据类型: string
  • 默认值: ""

--db-version string

  • 说明: 指定数据库安装包的版本(仅限在线安装)

可通过 'ptk candidate db' 查看支持的 MogDB Server 版本列表

  • 数据类型: string
  • 默认值: "5.0.6"

--default-guc

  • 说明: 不自动优化 GUC 参数,使用数据库默认参数
  • 数据类型: bool
  • 默认值: false

--enable-dss

  • 说明: 启用DSS组件
  • 数据类型: bool
  • 默认值: false

-e, --env strings

  • 说明: 环境变量将被添加到系统用户的配置文件中
  • 数据类型: strings
  • 默认值: []

-f, --file string

  • 说明: 指定集群配置文件
  • 数据类型: string
  • 默认值: ""

--install-cm

  • 说明: 安装 CM 组件
  • 数据类型: bool
  • 默认值: false

--launch-db-timeout duration

  • 说明: 启动数据库超时时间
  • 数据类型: duration
  • 默认值: 10m0s

--no-cache

  • 说明: 不使用本地缓存的安装包
  • 数据类型: bool
  • 默认值: false

--not-limit-cm-nodes

  • 说明: 不限制CM节点的数量必须是奇数
  • 数据类型: bool
  • 默认值: false

-p, --pkg string

  • 说明: 指定数据库安装包的文件路径或 URL
  • 数据类型: string
  • 默认值: ""

--post-run string

  • 说明: 指定 Bash 脚本路径,将在部署成功后分发到每个服务器上运行
  • 数据类型: string
  • 默认值: ""

--pre-run string

  • 说明: 指定 Bash 脚本路径,将在执行部署数据库之前分发到每个服务器上运行
  • 数据类型: string
  • 默认值: ""

--skip-check-distro

  • 说明: 跳过系统发行版检查,直接安装
  • 数据类型: bool
  • 默认值: false

--skip-check-os

  • 说明: 跳过系统环境检查,直接安装
  • 数据类型: bool
  • 默认值: false

--skip-check-package

  • 说明: 跳过安装包的 md5 校验和内部包的 sha256 校验
  • 数据类型: bool
  • 默认值: false

--skip-create-user

  • 说明: 跳过创建系统用户
  • 数据类型: bool
  • 默认值: false

--skip-gen-ptkc

  • 说明: 跳过生成 ptkc 工具
  • 数据类型: bool
  • 默认值: false

--skip-launch-db

  • 说明: 无需启动数据库
  • 数据类型: bool
  • 默认值: false

--skip-rollback

  • 说明: 安装失败时,不进行回滚操作
  • 数据类型: bool
  • 默认值: false

从父命令继承的选项

--disable-color

  • 说明: 禁用彩色日志
  • 数据类型: bool
  • 默认值: false

--disable-debug-log

  • 说明: 不生成调试日志文件
  • 数据类型: bool
  • 默认值: false

--disable-progressbar

  • 说明: 全局不显示进度条
  • 数据类型: bool
  • 默认值: false

-h, --help

  • 说明: 打印帮助信息
  • 数据类型: bool
  • 默认值: false

--log-file string

  • 说明: 指定运行日志文件路径
  • 数据类型: string
  • 默认值: ""

--log-format string

  • 说明: 指定运行日志的输出格式, 可选项: [text, json]
  • 数据类型: string
  • 默认值: "text"

--log-level string

  • 说明: 指定运行日志级别, 可选项: [debug, info, warning, error, panic]
  • 数据类型: string
  • 默认值: "info"

--silence

  • 说明: 不打印日志到标准输出
  • 数据类型: bool
  • 默认值: false

--skip-fix-ssh

  • 说明: 无需通过交互修复 ssh 连接
  • 数据类型: bool
  • 默认值: false

开始支持的版本

v0.1

另请参阅

  • ptk - Provisioning Toolkit for MogDB
Copyright © 2011-2024 www.enmotech.com All rights reserved.