添加 安装Redis6.md

This commit is contained in:
8ga 2025-10-27 19:49:14 +08:00
parent a99fdbb410
commit 2eaccab39d

20
安装Redis6.md Normal file
View File

@ -0,0 +1,20 @@
```
docker run -d \
--name redis-6.2.6 \
--memory="512m" \
--memory-swap="-1" \
--restart=on-failure:3 \
-p 宿主机端口号:6379 \
-v 替换成redis持久化存储目录:/data \
-e REDIS_PORT=6379 \
-e REDIS_REQUIREPASS='登录密码' \
docker.1ms.run/redis:6.2.6 \
redis-server --bind 0.0.0.0 \
--requirepass 'Ketao@789!' \
--appendonly no \
--save "" \
--dir /data \
--daemonize no \
--maxmemory 500mb \
--maxmemory-policy allkeys-lru
```