debian系统 使用docker部署redis打开外网访问
-
拉取镜像
docker pull redis:latest -
获取配置文件
wget https://download.redis.io/redis-stable/redis.conf -
修改配置文件
#bind 127.0.0.1 #允许远程连接 (注释) protected-mode no #保护模式 appendonly yes #持久化 requirepass abc1234567 #密码 -
Docker Run
docker run -p 6379:6379 -v /root/install/redis/redis.conf:/etc/redis/redis.conf -v /pan/redis/data:/data --name ry-redis -d redis /etc/redis/redis.conf