其他分享
首页 > 其他分享> > Docker-安装reids

Docker-安装reids

作者:互联网

安装redis

docker pull redis

创建挂载路径及配置文件

mkdir -p /mydata/redis/conf
touch /mydata/redis/conf/redis.conf

启动redis

docker run -p 6379:6379 --name redis -v /mydata/redis/data:/data \
-v /mydata/redis/conf/redis.conf:/etc/redis/redis.conf \
-d redis redis-server /etc/redis/redis.conf

启动redis客户端测试

docker exec -it redis redis-cli

redis.conf配置持久化

appendonly yes

具体配置查看官方文档
https://redis.io/topics/config

标签:mydata,data,reids,redis,etc,conf,Docker,安装,docker
来源: https://blog.csdn.net/csvbdd/article/details/116017245