$PWD 获取当前路径

安装 mysql

docker run --name mysql -p 3306:3306 -v $PWD/docker_data/mysql:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=设置密码 -d mysql:latest

安装 redis

docker run --name redis -p 6379:6379 -v $PWD/docker_data/redis:/data  -d redis redis-server --appendonly yes --requirepass "设置密码"

安装 etcd

export NODE1=0.0.0.0
docker run -d   -p 2379:2379   -p 2380:2380   -v $PWD/docker_data/etcd-data:/etcd-data   --name etcd  quay.io/coreos/etcd:latest   /usr/local/bin/etcd   --data-dir=/etcd-data --name node1   --initial-advertise-peer-urls http://${NODE1}:2380 --listen-peer-urls http://${NODE1}:2380   --advertise-client-urls http://${NODE1}:2379 --listen-client-urls http://${NODE1}:2379   --initial-cluster node1=http://${NODE1}:2380

安装 zookeeper

docker pull wurstmeister/zookeeper  
docker run -d --name zookeeper -p 2181:2181 -t wurstmeister/zookeeper:latest

安装 kafka

docker pull wurstmeister/kafka  
docker run -d --name kafka -p 9092:9092 -e KAFKA_BROKER_ID=0 -e KAFKA_ZOOKEEPER_CONNECT=192.168.1.86:2181 -e KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://192.168.1.86:9092 -e KAFKA_LISTENERS=PLAINTEXT://0.0.0.0:9092 -t wurstmeister/kafka

安装 nginx

docker pull nginx
docker run --name nginx -p 80:80 -p 443:443  nginx:latest
docker cp nginx:/etc/nginx/nginx.conf /home/server/nginx/nginx.conf
docker run -d --name nginx -p 80:80 -p 443:443 -v $PWD/nginx/nginx.conf:/etc/nginx/nginx.conf  nginx:latest
docker restart nginx

安装全链路监控Jaeger

docker run -d -e COLLECTOR_ZIPKIN_HTTP_PORT=9411 -p5775:5775/udp -p6831:6831/udp -p6832:6832/udp -p5778:5778 -p16686:16686 -p14268:14268 -p9411:9411 jaegertracing/all-in-one:latest
//地址  http://127.0.0.1:16686/search

联系 QQ: 3355168235