一、安裝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-compose
mysql
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