-
redis.conf
confacllog-max-len 128 requirepass 密码 lazyfree-lazy-eviction no lazyfree-lazy-expire no lazyfree-lazy-server-del no replica-lazy-flush no lazyfree-lazy-user-del no lazyfree-lazy-user-flush no oom-score-adj no oom-score-adj-values 0 200 800 disable-thp yes appendonly no appendfilename "appendonly.aof" appendfsync everysec no-appendfsync-on-rewrite no auto-aof-rewrite-percentage 100 auto-aof-rewrite-min-size 64mb aof-load-truncated yes aof-use-rdb-preamble yes lua-time-limit 5000 slowlog-log-slower-than 10000 slowlog-max-len 128 latency-monitor-threshold 0 notify-keyspace-events "" hash-max-ziplist-entries 512 hash-max-ziplist-value 64 list-max-ziplist-size -2 list-compress-depth 0 set-max-intset-entries 512 zset-max-ziplist-entries 128 zset-max-ziplist-value 64 -
docker-compose.yml
ymlversion: '3' services: redis: image: redis:8.4.0 container_name: redis_all ports: - 6379:6379 volumes: - ./redis.conf:/etc/redis/redis.conf - ./data:/data restart: always privileged: true # 获取宿主机root权限 command: ["redis-server","/etc/redis/redis.conf"] # 指定配置文件启动redis-server进程 -
docker compose up -d
docker-compose安装Redis
宋情写2026-01-18 15:23
相关推荐
Dontla18 小时前
Kubernetes Liveness Probe存活探针 / Readiness Probe就绪探针介绍(Startup Probe启动探针)重启容器七夜zippoe18 小时前
DolphinDB安装部署:单机版快速上手格林威18 小时前
工业相机 SDK 在 Docker 容器中的部署与权限配置(含 USB/GigE)快往胃里来18 小时前
Dify保姆级教程:部署、智能体、工作流到后端API何陋轩18 小时前
消息队列Kafka与RabbitMQ深度解析:把分布式消息核心讲透,吊打面试官PD我是你的真爱粉20 小时前
Redis 数据类型与底层实现:从 SDS、Quicklist 到 ZSet 跳表彻底讲透XDHCOM20 小时前
Redis节点故障自动恢复机制详解,如何快速抢救故障节点,确保数据不丢失?却话巴山夜雨时i1 天前
互联网大厂Java面试场景:Spring Boot、微服务与Redis实战解析麒麟ZHAO1 天前
鸿蒙flutter第三方库适配 - 文件对比工具香蕉鼠片1 天前
Redis