docker安装redis
一、创建目录(配置 + 数据)
sudo mkdir -p /data/redis/{data,conf}
二、下载官方标准 redis.conf(必须!)
sudo wget -O /data/redis/conf/redis.conf https://download.redis.io/redis-stable/redis.conf
三、配置redis.conf
bind 0.0.0.0
protected-mode no
四、启动容器
docker run -d \
--name redis \
--restart always \
-p 6379:6379 \
-v /data/redis/conf/redis.conf:/etc/redis/redis.conf \
-v /data/redis/data:/data \
redis \
redis-server /etc/redis/redis.conf

3万+

被折叠的 条评论
为什么被折叠?



