Redis安装(Docker)
找合适的版本
hub docker: Redis官方镜像
使用docker安装redis
sudo docker pull redis
docker-run
docker run -p 6379:6379 --name 119redis --restart always -v /data1/wzy/docker_data/redis/redis.conf:/etc/redis/redis.conf -v /data1/wzy/docker_data/redis/data:/data -d redis redis-server /etc/redis/redis.conf --appendonly yes
docker-compose
version: '3.3'
services:
etc:
ports:
- '6379:6379'
container_name: 119redis
volumes:
- '/data1/wzy/docker_data/redis/redis.conf:/etc/redis/redis.conf'
- '/data1/wzy/docker_data/redis/data:/data'
image: /etc/redis/redis.conf
License:
CC BY 4.0