$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

  docker run -d \
  -p 2379:2379 \
  -p 2380:2380 \
  --mount type=bind,source=/tmp/etcd-data.tmp,destination=/etcd-data \
  --name etcd-gcr-v3.4.14 \
  gcr.io/etcd-development/etcd:v3.4.14 \
  /usr/local/bin/etcd \
  --name s1 \
  --data-dir /etcd-data \
  --listen-client-urls http://0.0.0.0:2379 \
  --advertise-client-urls http://0.0.0.0:2379 \
  --listen-peer-urls http://0.0.0.0:2380 \
  --initial-advertise-peer-urls http://0.0.0.0:2380 \
  --initial-cluster s1=http://0.0.0.0:2380 \
  --initial-cluster-token tkn \
  --initial-cluster-state new \
  --log-level info \
  --logger zap \
  --log-outputs stderr

安装 hbase


docker run -d -h docker-hbase \
        -p 2181:2181 \
        -p 8080:8080 \
        -p 8085:8085 \
        -p 9090:9090 \
        -p 9000:9000 \
        -p 9095:9095 \
        -p 16000:16000 \
        -p 16010:16010 \
        -p 16201:16201 \
        -p 16301:16301 \
        -p 16020:16020\
        --name hbase \
        harisekhon/hbase
修改hosts
填入服务器IP docker-hbase     

http://docker-hbase:16010/master-status   

安装 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