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语法
加密敏感信息
介绍
在编写配置文件时,如果要填写密码字段时,为了安全考虑,PTK 不允许在配置文件中直接填写明文信息,必须使用 PTK 提供的 encrypt
命令进行加密后再填写。
配置文件中的密码字段包含:
- global.user_password
- global.db_password
- ssh_option.password
- ssh_option.passphrase
加密方式
-
将密码作为参数加密(建议将密码通过单引号包裹起来,避免密码中存在特殊字符被 shell 解析)
ptk encrypt '密码'
-
交互式输入密码
ptk encrypt --stdin
-
通过管道传递密码给 PTK
echo '密码' | ptk encrypt --stdin [--disable-prompt]