单机版的TiDB体验
注:操作系统是CentOS 7.4 、 Ubuntu 16
# 下载压缩包
wget http://download.pingcap.org/tidb-latest-linux-amd64.tar.gz
wget http://download.pingcap.org/tidb-latest-linux-amd64.sha256
# 检查文件完整性,返回 ok 则正确
sha256sum -c tidb-latest-linux-amd64.sha256
# 解开压缩包
tar -xzf tidb-latest-linux-amd64.tar.gz
cd
tidb-latest-linux-amd6
快速部署
如下步骤依次启动PD, TiKV, TiDB
启动PD
注:如果是单界面回话可以放到后台运行,我这边是xshell所以没有放到后台多界面操作
./bin/pd-server --data-dir=pd --log-file=pd.log &
命令行输出
······
2018/09/09 14:38:28 server.go:190: [info] init cluster id 6373614252582442019
2018/09/09 14:38:28 leader.go:194: [info] PD cluster leader pd is ready to serve
启动PB成功.
启动 TiKV
./bin/tikv-server --pd="127.0.0.1:2379" --data-dir=tikv --log-file=tikv.log &
命令行输出
······
2018/09/09 14:41:44.745 mod.rs:186: [INFO] starting working thread: snap-handler
2018/09/09 14:41:44.745 server.rs:153: [INFO] TiKV is ready to serve
启动TiKV成功.
启动TiDB
./bin/tidb-server --store=tikv --path="127.0.0.1:2379" --log-file=tidb.log &
命令行输出
······
2018/09/09 14:47:09 systime_mon.go:11: [info] start system time monitor
2018/09/09 14:47:09 server.go:241: [info] Listening on :10080 for status and metrics report.
启动TiDB成功.
启动mysql客户端
mysql -h 127.0.0.1 -P 4000 -u root
整体来说, 文档很清晰, 部署流程也很轻量,也可以看一下上一篇生产环境中的TIDB部署,可以参考
转载于:https://blog.51cto.com/13767724/2172838