目 录CONTENT

文章目录

debian系统 使用docker部署redis打开外网访问

不争
2024-05-27 / 0 评论 / 0 点赞 / 43 阅读 / 762 字

  1. 拉取镜像

    docker pull redis:latest

  2. 获取配置文件

    wget https://download.redis.io/redis-stable/redis.conf
  3. 修改配置文件

    #bind 127.0.0.1 #允许远程连接 (注释)
    protected-mode no #保护模式
    appendonly yes #持久化
    requirepass abc1234567 #密码
  4. 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
    ​

0

评论区