0
点赞
收藏
分享

微信扫一扫

CentOS 7部署TIDB单机

阎小妍 2023-04-11 阅读 86
tidb运维

CentOS 7部署TIDB单机:

curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh

source /root/.bash_profile

vi topo.yaml (将10.0.1.1改为实际ip,单ip为单机,多ip即为集群)

# 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: "/tidb-deploy" data_dir: "/tidb-data"

# Monitored variables are applied to all the machines.

monitored: node_exporter_port: 9100 blackbox_exporter_port: 9115

server_configs: tidb: log.slow-threshold: 300 tikv: readpool.storage.use-unified-pool: false readpool.coprocessor.use-unified-pool: true pd: replication.enable-placement-rules: true replication.location-labels: ["host"] tiflash: logger.level: "info"

pd_servers:

  • host: 10.0.1.1

tidb_servers:

  • host: 10.0.1.1

tikv_servers:

  • host: 10.0.1.1 port: 20160 status_port: 20180 config: server.labels: { host: "logic-host-1" }
  • host: 10.0.1.1 port: 20161 status_port: 20181 config: server.labels: { host: "logic-host-2" }
  • host: 10.0.1.1 port: 20162 status_port: 20182 config: server.labels: { host: "logic-host-3" }

tiflash_servers:

  • host: 10.0.1.1

monitoring_servers:

  • host: 10.0.1.1

grafana_servers:

  • host: 10.0.1.1

:wq

tiup cluster deploy ming v7.0.0 ./topo.yaml --user root -p (5.7.25-TiDB-v7.0.0)

输入root密码 输入y(继续)

tiup cluster start ming --init

会给出新的tidb root密码

tiup cluster list

tiup cluster display ming

mysql -h 10.0.1.1 -P 4000 -u root -p'xxxxxxx' (10.0.1.1改为实际ip)

修改tidb的root密码

use mysql; update user set authentication_string=password('xxxxxx') where user='root'; flush privileges;

grafana访问 http://10.0.1.1:3000 初始用户名密码都是admin (10.0.1.1改为实际ip)

tidb dashboard访问 http://10.0.1.1:2379/dashboard 用户名root 密码是上步tidb的密码

举报

相关推荐

0 条评论