CentOS TiDB 单机安装(Docker Compose快速构建集群)

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

1、安装Docker

sudo yum install -y yum-utils device-mapper-persistent-data lvm2 
sudo yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo 

2、安装并启动 Docker-CE

sudo yum install docker-ce

 

sudo systemctl enable docker
sudo systemctl start docker

3、下载 tidb-docker-compose

git clone https://github.com/pingcap/tidb-docker-compose.git

4、启动

cd tidb-docker-compose && docker- compose pull #获取最新的Docker镜像 
docker-compose up -d

5、访问

mysql -h 127.0.0.1 -P 4000 -u root

CentOS TiDB 单机安装(Docker Compose快速构建集群)_第1张图片

可能遇到的问题

1. docker-compose命令无效

解决:

yum -y install epel-release
yum -y install python-pip
 pip install docker-compose

参考:

https://github.com/pingcap/docs-cn/blob/master/op-guide/docker-compose.md

https://blog.csdn.net/qq_32447321/article/details/76512137

https://www.cnblogs.com/myzony/p/9071210.html

转载于:https://my.oschina.net/u/782865/blog/2994661

你可能感兴趣的:(CentOS TiDB 单机安装(Docker Compose快速构建集群))