Docker-Redis安装
wget https://download.redis.io/releases/redis-4.0.8.tar.gz
tar -zxvf redis-4.0.8.tar.gz
cd redis-4.0.8
cp redis.conf /data/redis/conf
docker stop redis_10170
docker rm redis_10170
docker run --restart=always --name redis_10170 \
-p 10170:6379 \
-v /data/redis/data:/data/ \
-v /data/redis/conf:/usr/local/etc/redis \
-d redis:4.0.8 redis-server /usr/local/etc/redis/redis.conf
docker stop redis_10170
docker rm redis_10170
docker run --name redis_10170 \
-p 10170:6379 \
-v /data/redis/conf:/usr/local/etc/ \
-d redis:4.0.8 redis-server /usr/local/etc/redis.conf
-v /data/redis/data:/data/redis/data \
docker exec -it redis_10170 bash
docker logs redis_10170
mkdir -p /data/redis/data /data/redis/c
wget https://download.redis.io/releases/redis-6.0.0.tar.gz
tar -zxvf redis-6.0.0.tar.gz
cd redis-6.0.0
cp redis.conf /data/redis/conf
docker stop redis_10170
docker rm redis_10170
docker run --restart=always --name redis_10170 \
-p 10170:6379 \
-v /data/redis/data:/data/ \
-v /data/redis/conf:/usr/local/etc/redis \
-d redis:6.0.0 redis-server /usr/local/etc/redis/redis.conf
docker run -itd --name redis-6379 -p 6379:6379 redis --requirepass 123456