赞
踩
docker pull redis
chmod 777 redis6379.log
chmod 777 redis6380.log
chmod 777 redis6381.log
docker run -it \
--name redis_6379 \
--privileged \
-p 6379:6379 \
--network wn_docker_net \
--ip 172.18.12.10 \
--sysctl net.core.somaxconn=1024 \
-e TIME_ZONE="Asia/Shanghai" -e TZ="Asia/Shanghai" \
-v /usr/local/software/redis/6379/conf/redis6379.conf:/usr/local/etc/redis/redis.conf \
-v /usr/local/software/redis/6379/data/:/data \
-v /usr/local/software/redis/6379/log/redis6379.log:/var/log/redis.log \
-d redis \
/usr/local/etc/redis/redis.conf
docker exec -it redis_6379 bash
redis-cli
info replication
docker exec -it redis_6379 bash
redis-cli
set food bread
docker run -it \
--name redis_6380 \
--privileged \
-p 6380:6379 \
--network wn_docker_net \
--ip 172.18.12.11 \
--sysctl net.core.somaxconn=1024 \
-e TIME_ZONE="Asia/Shanghai" -e TZ="Asia/Shanghai" \
-v /usr/local/software/redis/6380/conf/redis6380.conf:/usr/local/etc/redis/redis.conf \
-v /usr/local/software/redis/6380/data/:/data \
-v /usr/local/software/redis/6380/log/redis6380.log:/var/log/redis.log \
-d redis \
/usr/local/etc/redis/redis.conf
docker exec -it redis_6380 bash
redis-cli
info replication
按照创建 redis_6380 的步骤创建即可.
docker run -it \
--name redis_6381 \
--privileged \
-p 6381:6379 \
--network wn_docker_net \
--ip 172.18.12.12 \
--sysctl net.core.somaxconn=1024 \
-e TIME_ZONE="Asia/Shanghai" -e TZ="Asia/Shanghai" \
-v /usr/local/software/redis/6381/conf/redis6381.conf:/usr/local/etc/redis/redis.conf \
-v /usr/local/software/redis/6381/data/:/data \
-v /usr/local/software/redis/6381/log/redis6381.log:/var/log/redis.log \
-d redis \
/usr/local/etc/redis/redis.conf
firewall-cmd --add-port=3312/tcp --permanent
firewall-cmd --reload
firewall-cmd --list-ports
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。