1.下载压缩包
wget http://download.pingcap.org/tidb-latest-linux-amd64.tar.gz
wget http://download.pingcap.org/tidb-latest-linux-amd64.sha256
2.检查文件完整性
[root@localhost tools]# sha256sum -c tidb-latest-linux-amd64.sha256tidb-latest-linux-amd64.tar.gz
OK #返回ok说明文件没问题
3.解压tar -xzf tidb-latest-linux-amd64.tar.gz
cd tidb-latest-linux-amd64
4.启动PD
[root@localhost tidb-latest-linux-amd64]# ./bin/pd-server --data-dir=/data/pd --log-file=/data/logs/pd.log &
查看启动的进程[root@localhost tidb-latest-linux-amd64]# ps -ef|grep pd-server
5.启动TiKV
[root@localhost tidb-latest-linux-amd64]# ./bin/tikv-server --pd=“127.0.0.1:2379” --data-dir=/data/tikv --log-file=/data/logs/tikv.log &
[root@localhost tidb-latest-linux-amd64]# ps -ef|grep tikv-server
6.启动TiDB
[root@localhost tidb-latest-linux-amd64]# ./bin/tidb-server --store=tikv --path=“127.0.0.1:2379” --log-file=/data/logs/tidb.log &
[root@localhost tidb-latest-linux-amd64]# ps -ef|grep tidb-server
7.使用mysql连接TiDB [root@localhost logs]# mysql -h 127.0.0.1 -P 4000 -u root -D test
tiDB 单机版安装
最新推荐文章于 2024-06-07 14:49:23 发布