搜索
您的当前位置:首页正文

最新版本Redis:Redis 7.0 安装使用,Docke启动Redis,Redis使用场景-2022年最新Redis图解安装

来源:易榕旅网

最新版本Redis:Redis 7.0 安装使用,Docker安装Redis,Redis使用场景-2022年最新Redis图解安装

#拉取redis 7.0.4版本镜像
docker pull redis:7.0.4-alpine3.16

#启动redis docker 

docker run -d \
--name redis_6379 \
-p 6379:6379  \
--restart="always" \
redis:7.0.4-alpine3.16 

配置redis.conf 

include redis.conf

bind 0.0.0.0
protected-mode no
requirepass 'Jiayou!@#098'

port 6379
tcp-backlog 511
timeout 0
tcp-keepalive 300
daemonize no
supervised no
pidfile /redis/redis_6379.pid
loglevel notice
logfile /redis/redis.log
databases 16
always-show-logo yes

##RDB保存策略
save 900 1
save 300 10
save 60 10000

stop-writes-on-bgsave-error no

rdbcompression yes

rdbchecksum yes



dbfilename dump.rdb
dir /redis/data

replica-serve-stale-data yes
replica-read-only yes

repl-diskless-sync no
repl-diskless-sync-delay 5
repl-disable-tcp-nodelay no
replica-priority 100


#rename-command CONFIG ""
#rename-command KEYS     ""
#rename-command FLUSHALL ""
#rename-command FLUSHDB  ""
#rename-command CONFIG   ""

appendonly yes
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

hll-sparse-max-bytes 3000

stream-node-max-bytes 4096
stream-node-max-entries 100

activerehashing yes

client-output-buffer-limit normal 0 0 0
client-output-buffer-limit replica 256mb 64mb 60
client-output-buffer-limit pubsub 32mb 8mb 60

hz 10

dynamic-hz yes

aof-rewrite-incremental-fsync yes

rdb-save-incremental-fsync yes

看完帮忙用拼多多扫个码吧,哈哈。

 

因篇幅问题不能全部显示,请点此查看更多更全内容

Top