% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 5152k 100 5152k 0 0 4201k 0 0:00:01 0:00:01 --:--:-- 4206k WARN: adding root certificate via internet: https://tiup-mirrors.pingcap.com/root.json You can revoke this by remove /root/.tiup/bin/7b8e153f2e2d0928.root.json Successfully set mirror to https://tiup-mirrors.pingcap.com Detected shell: bash Shell profile: /root/.bash_profile /root/.bash_profile has been modified to add tiup to PATH open a new terminal or source /root/.bash_profile to use it Installed path: /root/.tiup/bin/tiup =============================================== Have a try: tiup playground ===============================================
# # Global variables are applied to all deployments and used as the default value of # # the deployments if a specific deployment value is missing. global: user:"tidb" ssh_port:22 deploy_dir:"/home/tidb/tidb-deploy" data_dir:"/home/tidb/tidb-data"
# # Monitored variables are applied to all the machines. monitored: node_exporter_port:9100 blackbox_exporter_port:9115
[root@hf2 home]# tiup cluster list Name User Version Path PrivateKey ---- ---- ------- ---- ---------- tidb-cluster tidb v7.5.3 /root/.tiup/storage/cluster/clusters/tidb-cluster /root/.tiup/storage/cluster/clusters/tidb-cluster/ssh/id_rsa
启动集群: tiup cluster start tidb-cluster
1 2 3
...... + [ Serial ] - UpdateTopology: cluster=tidb-cluster Started cluster `tidb-cluster` successfully
查看集群的拓扑结构和状态: tiup cluster display tidb-cluster
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
[root@hf2 tidb-topo]# tiup cluster display tidb-cluster Cluster type: tidb Cluster name: tidb-cluster Cluster version: v7.5.3 Deploy user: tidb SSH type: builtin Dashboard URL: http://10.88.88.70:2379/dashboard Grafana URL: http://10.88.88.70:3000 ID Role Host Ports OS/Arch Status Data Dir Deploy Dir -- ---- ---- ----- ------- ------ -------- ---------- 10.88.88.70:3000 grafana 10.88.88.70 3000 linux/x86_64 Up - /home/tidb/tidb-deploy/grafana-3000 10.88.88.70:2379 pd 10.88.88.70 2379/2380 linux/x86_64 Up|L|UI /home/tidb/tidb-data/pd-2379 /home/tidb/tidb-deploy/pd-2379 10.88.88.70:9090 prometheus 10.88.88.70 9090/12020 linux/x86_64 Up /home/tidb/tidb-data/prometheus-9090 /home/tidb/tidb-deploy/prometheus-9090 10.88.88.70:4000 tidb 10.88.88.70 4000/10080 linux/x86_64 Up - /home/tidb/tidb-deploy/tidb-4000 10.88.88.70:9000 tiflash 10.88.88.70 9000/8123/3930/20170/20292/8234 linux/x86_64 Up /home/tidb/tidb-data/tiflash-9000 /home/tidb/tidb-deploy/tiflash-9000 10.88.88.70:20160 tikv 10.88.88.70 20160/20180 linux/x86_64 Up /home/tidb/tidb-data/tikv-20160 /home/tidb/tidb-deploy/tikv-20160 10.88.88.70:20161 tikv 10.88.88.70 20161/20181 linux/x86_64 Up /home/tidb/tidb-data/tikv-20161 /home/tidb/tidb-deploy/tikv-20161 10.88.88.70:20162 tikv 10.88.88.70 20162/20182 linux/x86_64 Up /home/tidb/tidb-data/tikv-20162 /home/tidb/tidb-deploy/tikv-20162 Total nodes: 8
修改root密码
安装mysql client yum install mysql 登录客户端 mysql -h 127.0.0.1 -P 4000 -u root 修改root密码 SET PASSWORD FOR 'root'@'%' = 'xxx';
Error: Failed to initialize TiDB environment on remote host '10.88.88.70' (task.env_init.failed) caused by: Failed to create '~/.ssh' directory for user 'tidb' caused by: Failed to execute command over SSH for 'root@10.88.88.70:22' caused by: Process exited with status 1