Docker 要求 CentOS 系统的内核版本高于 3.10 ,通过 uname -r 命令查看你当前的内核版本:
- uname -r
- 3.10.0-1062.1.2.el7.x86_64
安装 Docker:
- 安装 Docker:
-
- yum -y install docker
- docker pull wurstmeister/zookeeper
- docker pull wurstmeister/kafka
- #启动zookeeper容器
- docker run -d --name zookeeper -p 2181:2181 -t wurstmeister/zookeeper
- #启动kafka容器
-
- docker run -d --name kafka --publish 9092:9092 --link zookeeper --env KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181 --env KAFKA_ADVERTISED_HOST_NAME=172.16.0.117 --env KAFKA_ADVERTISED_PORT=9092 --volume /etc/localtime:/etc/localtime wurstmeister/kafka:latest
- docker search redis
- docker pull redis
- docker run -p 6379:6379 -d redis:latest redis-server
docker run -d -p 8889:8889 freakchicken/kafka-ui-lite
docker pull mysql
拉取最新MySQL
docker pull mysql:5.7
拉取指定版本MySQL
- docker run -p 33061:3306 --name mysql01 \
- -v /home/softdev/docker_mysql57/data:/var/lib/mysql \
- -v /home/softdev/docker_mysql57/conf:/etc/mysql/conf.d \
- -v /home/softdev/docker_mysql57/log:/var/log/mysql \
- -e MYSQL_ROOT_PASSWORD=root \
- -d mysql:5.7