1. Install the docker

cd /etc/yum.repos.d/ wget https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo yum install docker-ce -y Systemctl enable docker && SystemCTL start DockerCopy the code

2. Deployed nginx

Docker run --name nginx -d -p 80:80 nginx:1.15Copy the code

3. Deploy redis5

Docker run --name redis -p 6379:6379 -d redis:5.0.7 #redis --name redis -p 6379:6379 -d redis:5.0.7  redis-benchmark -n 100000 -qCopy the code

4. The deployment mysql5.7

Docker run --name MYSQL_ROOT_PASSWORD=666666 -d -p 3306:3306 mysql:5.7Copy the code

5. Mongodb4.2.6 deployment

docker run -itd --name mongo -v /data/mongo/data:/data/db -p 27017:27017 mongo --auth
Copy the code

Note: The default data is stored in the /data/db directory of the container system –auth enables authentication

5.1 Setting a Password

Docker exec -- it mongo bash -- docker exec -- it mongo bash -- docker exec -- it mongo bash user:'admin',pwd:'123456',roles:[ { role:'userAdminAnyDatabase', db: 'admin'}]}); # certification db. The auth (' admin ', '123456'); Db.createuser ({user:'user', PWD :'123456',roles:[{role:'readWrite', db: 'testdb'}]}) Auth ('user','123456') # switch to testDB. Use testDB Db.person. Insert ({name:'libai-go',age:18}) #Copy the code

6. Elasticsearch deployment

# Create a network, container within the same network, Docker run -d --name elasticSearch -- docker run -d --name elasticSearch --net somenetwork -p 9200:9200 -p 9300:9300 -e "discovery. Type =single-node" ElasticSearch :7.6.2Copy the code

Kibana 7. Deployment

# install kibana docker run -d --name kibana --net somenetwork -p 5601:5601 kibana:7.6.2Copy the code

Visit http://ip:5601 to open Kibana

8. The deployment of the rabbitmq

# installed mq docker run - itd - rm - the hostname the rabbitmq server - v/data/docker/rabbitmq: / var/lib/rabbitmq - e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=admin -p 15672:15672 -p 5672:5672 rabbitMQ :3.8.5- Management RABBITMQ_DEFAULT_USER=admin -p 15672:5672 rabbitMQ :3.8.5- ManagementCopy the code

9. The deployment of etcd

Etcd docker run -d --name etcd -p 2379:2379 -p 2380:2380 --env ALLOW_NONE_AUTHENTICATION=yes bitnami/etcd docker exec -it etcd etcdctl endpoint status --cluster -w tableCopy the code

Command Usage

www.orchome.com/620

The cluster Docker is built

Blog.csdn.net/weixin\_426…