CentOS TiDB 單機安裝(Docker Compose快速構建集羣)

一、安裝Dockerhtml

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

二、安裝並啓動 Docker-CEpython

sudo yum install docker-ce

 

sudo systemctl enable docker
sudo systemctl start docker

三、下載 tidb-docker-composemysql

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

四、啓動linux

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

五、訪問git

mysql -h 127.0.0.1 -P 4000 -u root

可能遇到的問題github

1. docker-compose命令無效sql

解決:docker

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

參考:centos

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

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

http://www.javashuo.com/article/p-znesnbxp-dp.html

相關文章
相關標籤/搜索