docker 配置 mysql, Zookeeper, kafka,redis,mongo

Mysql

sudo docker run -p 3306:3306 --name mysql -v /Users/xueyunlong/docker/mysql/conf:/etc/mysql/conf.d -v /Users/xueyunlong/docker/mysql/logs:/logs -v /Users/xueyunlong/docker/mysql/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=123456 -d mysql:5.6

Kafka && Zookeeper

macos 通过docker安装:https://segmentfault.com/a/1190000022727674
macos直接安装:https://colobu.com/2019/09/27/install-Kafka-on-Mac/

安装redis

docker run -i -t -p 0.0.0.0:6379:6379 --name redis -d redis --requirepass "123456"

安装mongo

docker run --name some-mongo -p 27017:27017 -d mongo --auth 
docker exec -it some-mongo mongo admin
db.createUser( { user: "admin",  pwd: "admin",  roles: [ { role: "root", db: "admin" } ] } ) 
db.auth("admin","admin")

你可能感兴趣的:(docker 配置 mysql, Zookeeper, kafka,redis,mongo)