v2.0
- 关于PTK
- 快速入门
- 使用指南
- 使用参考
- 配置文件示例
- 命令介绍
- ptk
- ptk completion
- ptk view-static-config
- ptk init-cluster
- ptk collect
- ptk rec-guc
- ptk cache
- ptk gen-ptkc
- ptk manage
- ptk demo
- ptk meta
- ptk version
- ptk self
- ptk gen-om-xml
- ptk env
- ptk gen-static-config
- ptk cluster
- ptk cluster createdb
- ptk cluster uninstall-compat-tools
- ptk cluster install-compat-tools
- ptk cluster install-mogila
- ptk cluster rename
- ptk cluster throwout
- ptk cluster takeover
- ptk cluster uninstall-cm
- ptk cluster install-cm
- ptk cluster gen-cert-files
- ptk cluster load-cm-vip
- ptk cluster del-kerberos-auth
- ptk cluster add-kerberos-auth
- ptk cluster uninstall-kerberos-server
- ptk cluster install-kerberos-server
- ptk cluster is-in-upgrade
- ptk cluster upgrade-rollback
- ptk cluster upgrade-commit
- ptk cluster upgrade
- ptk cluster demote
- ptk cluster promote
- ptk cluster refresh
- ptk cluster shell
- ptk cluster modify-comment
- ptk cluster show-config
- ptk cluster set-guc
- ptk cluster show-guc
- ptk cluster set-hba
- ptk cluster show-hba
- ptk cluster scale-out
- ptk cluster scale-in
- ptk cluster uninstall-mogha
- ptk cluster install-mogha
- ptk cluster list-plugins
- ptk cluster install-plugin
- ptk cluster inspect
- ptk cluster failover
- ptk cluster switchover
- ptk cluster build
- ptk cluster status
- ptk cluster restart
- ptk cluster stop
- ptk cluster start
- ptk uninstall
- ptk ls
- ptk install
- ptk exec
- ptk template
- ptk encrypt
- ptk checkos
- ptk download
- ptk candidate
- 故障排查
- FAQ
- 发布记录
- 社区
- 附录:YAML语法
主备集群
一主一备
global:
# 集群名
cluster_name: c1
# 操作系统用户名
user: omm
# 系统用户密码
user_password: "" # ptk encrypt password
# 数据库密码
db_password: "" # ptk encrypt password
# 数据库端口
db_port: 26000
# 数据库安装基础目录
base_dir: /data/mogdb
db_servers:
- host: <IP1>
# 数据库角色,支持: primary, standby, cascade_standby
role: primary
# SSH connection configuration
ssh_option:
port: 22
user: root
password: "" # ptk encrypt password
key_file: ""
passphrase: ""
- host: <IP2>
role: standby
ssh_option:
port: 22
user: root
password: "" # ptk encrypt password
key_file: ""
passphrase: ""
一主两备一级联
global:
# 集群名
cluster_name: shockley
# 操作系统用户名
user: vimiix
# 系统用户密码
user_password: "" # ptk encrypt password
# 数据库密码
db_password: "" # ptk encrypt password
# 数据库端口
db_port: 26000
# 数据库安装基础目录
base_dir: /data/mogdb
# SSH 登录信息,这里我们演示所有数据库服务器的登录信息均相同
# 所以仅需在 global 里配置一份即可
ssh_option:
port: 22
user: root
password: "" # ptk encrypt password
key_file: ""
passphrase: ""
db_servers:
- host: <IP1>
role: primary
- host: <IP2>
role: standby
- host: <IP3>
role: standby
- host: <IP4>
role: cascade_standby
# 当前级联备的上游备库IP
upstream_host: <IP3>