Docker Compose构建TiDB集群

1.软硬件要求
centos7.3及以上(http://archive.kernel.org/centos-vault/)
内存2G及以上
线上环境配置不要看这篇博客了,官网推荐TiDB-Ansible部署方案,硬盘还要求SSD,哈哈哈
2.依赖软件
Docker(17.06.0 及以上版本)
Docker Compose
Git
3.安装具体过程
# git
	yum -y install git

# Docker
	yum remove docker  docker-common docker-selinux docker-engine
	yum install -y yum-utils device-mapper-persistent-data lvm2
	yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
	yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
	yum list docker-ce --showduplicates | sort -r
	yum install docker-ce
	sudo usermod -aG docker $USER
	sudo systemctl start docker

# Docker Compose
	yum -y install epel-release
	yum -y install python-pip
	pip install --upgrade pip
	docker-compose -version

# tidb
	git clone https://github.com/pingcap/tidb-docker-compose.git
	cd tidb-docker-compose && docker-compose pull
	docker-compose up -d

# mysql安装
	wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
	sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm
	sudo yum install mysql-server
	/bin/systemctl start  mysql.service
	mysql -u root
4.启动并访问
# 启动
	mysql -h 127.0.0.1 -P 4000 -u root
# 集群 Grafana 监控页面
	http://localhost:3000
# 集群数据可视化
	http://localhost:8010

你可能感兴趣的:(tidb)