1. 安装部署
1.1 单机版快速安装
将下载的安装包解压缩,进入解压后的根目录,执行 ./dbd -I 进行DBdoctor的快速安装。
注:使用-I参数执行脚本会执行单机版的一键安装。
*主机部署安装最小资源要求:
CPU:4核
内存:8G
1.2 集群版快速安装
(1)提前准备高可用mysql,版本要求>=5.7.8,账号要求有建库、建表、读写数据权限。
(2)提前准备高可用kafka,版本要求>=2.4.1。
(3)参照如下示例拼装高可用版本安装命令并执行
./dbd -IS --mode ha --ip <hostip> --mysql <mysql_ip:mysql_port> --mysql_user <mysql_user> --mysql_password <mysql_password> --kafka <kafka_ip:kafka_port>
(4)拷贝压缩包到另外一台服务器,执行上述1-3步,注意使用同一套mysql与kafka
(5)使用两台服务器均可访问dbdoctor,一台故障时,可访问另一台;可以自行配置keepalived通过vip实现故障自动切换
1.3 其他模式安装
如需其他安装模式,请参见下列参数配置项说明以及安装命令。
Usage:
Quick Install: ./dbd -I
Quick Install With Ip: ./dbd -I --ip <host ip1> --download_ip <host ip2>. use the command, when host have multiple ip
Quick Ha Install: ./dbd -I --mode ha --ip <host ip> --mysql <mysql_ip:mysql_port> --mysql_user <mysql_user> --mysql_password <mysql_password> --kafka <kafka_ip:kafka_port>
Command:
-H, --help print this message
-I, --install install dbdoctor
--logs collect install and runtime logs to analyze problems
--restart can with [all] restart all service, or with single component name in [mysql,kafka,dra-pi,dra-data-sample,dra-algo-ml,agent]
--start can with [all] start all service, or with single component name in [mysql,kafka,dra-pi,dra-data-sample,dra-algo-ml,agent]
--status show component process status
--stop can with [all] stop all service,or with single component name in [mysql,kafka,dra-pi,dra-data-sample,dra-algo-ml,agent]
-U, --uninstall uninstall dbdoctor
--switch switch [audit,db,msg]
audit:only switch audit db to new mysql or doris, withoption --mysql<ip:port> --mysql_user --mysql_password, when switch to doris,also need --http_port option
db : switch all db to new mysql, with option --mysql<ip:port> --mysql_user --mysql_password
msg : switch all msg to new kafka, with option --kafka<ip:port>
Option:
--ip host ip
--download_ip download ip,used for download agent from server when the host have multiple ip
-K --kafka provide kafka address, format like <kafka_ip>:<kafka_port>
-M, --mode mode, stand-alone or ha
--mysql provide mysql protocol address, format like <mysql_ip>:<mysql_port>
--mysql_user mysql protocol user
--mysql_password mysql protocol password
--http_port when switch audit db to doris, provide doris http port
2. 安装后验证
2.1 安装完成
安装成功后打印访问地址:安装成功后打印访问地址:
service is ready.
please visit http://xxx.xxx.xxx.xxx:13000/ to start using your DBdoctor product,with user [tester] and password [Root2023!]
其中,xxx.xxx.xxx.xxx为用户安装的主机IP地址。
脚本执行完会自动创建一个初始测试账号tester(初始密码Root2023!)和一个初始管理员账号admin(初始密码123456)。
2.2 系统验证
在浏览器中输入上一步脚本返回的地址(http://xxx.xxx.xxx.xxx:13000/),进入DBdoctor管理控制台页面,输入测试账号或管理员账号的用户名/密码,验证是否成功登录。
2.3 系统停止
./dbd --stop
2.4 系统启动./dbd --start
2.5 系统重启./dbd --restart
2.6 系统卸载./dbd --uninstall
更多介绍内容,请参考产品文档。