当前位置:网站首页>docker安装redis
docker安装redis
2022-07-03 02:56:00 【玩代码】
1.下载官网镜像
docker pull redis2.创建redis目录和conf文件
cd /mydata/
mkdir redis
mkdir redis/conf
touch /mydata/redis/conf/redis.conf3.编辑redis.conf文件
vi redis.conf
# 加入以下内容
# bind 192.168.1.100 10.0.0.1
# bind 127.0.0.1 ::1
#bind 127.0.0.1
protected-mode no
port 6379
tcp-backlog 511
requirepass 000415
timeout 0
tcp-keepalive 300
daemonize no
supervised no
pidfile /var/run/redis_6379.pid
loglevel notice
logfile ""
databases 30
always-show-logo yes
save 900 1
save 300 10
save 60 10000
stop-writes-on-bgsave-error yes
rdbcompression yes
rdbchecksum yes
dbfilename dump.rdb
dir ./
replica-serve-stale-data yes
replica-read-only yes
repl-diskless-sync no
repl-disable-tcp-nodelay no
replica-priority 100
lazyfree-lazy-eviction no
lazyfree-lazy-expire no
lazyfree-lazy-server-del no
replica-lazy-flush no
appendonly yes
appendfilename "appendonly.aof"
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-max-len 128
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
hz 10
dynamic-hz yes
aof-rewrite-incremental-fsync yes
rdb-save-incremental-fsync yes
4.启动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.conf5.查看redis
docker ps
6.进入redis客户端
docker exec -it redis redis-cli边栏推荐
- Why choose a frame? What frame to choose
- Check log4j problems using stain analysis
- SQL Server Query spécifie la structure de la table
- Thunderbolt Chrome extension caused the data returned by the server JS parsing page data exception
- vfork执行时出现Segmentation fault
- Two dimensional format array format index subscript continuity problem leads to return JSON format problem
- Can netstat still play like this?
- I2C 子系统(四):I2C debug
- HTB-Devel
- Can I use read-only to automatically implement properties- Is read-only auto-implemented property possible?
猜你喜欢

【Flutter】shared_ Preferences local storage (introduction | install the shared_preferences plug-in | use the shared_preferences process)

Super easy to use logzero

迅雷chrome扩展插件造成服务器返回的数据js解析页面数据异常
![[shutter] bottom navigation bar page frame (bottomnavigationbar bottom navigation bar | pageview sliding page | bottom navigation and sliding page associated operation)](/img/6e/67bc187a89fb9125856c78c89f7bfb.gif)
[shutter] bottom navigation bar page frame (bottomnavigationbar bottom navigation bar | pageview sliding page | bottom navigation and sliding page associated operation)

Can netstat still play like this?

Deep learning: multi-layer perceptron and XOR problem (pytoch Implementation)

Le processus de connexion mysql avec docker

Kubernetes family container housekeeper pod online Q & A?

SQL statement

超好用的日志库 logzero
随机推荐
Add automatic model generation function to hade
I2C subsystem (III): I2C driver
Mathematical statistics -- Sampling and sampling distribution
Hcip137-147 title + analysis
[Hcia]No.15 Vlan间通信
疫情当头,作为Leader如何进行代码版本和需求开发管控?| 社区征文
Today, it's time to copy the bottom!
一文带你了解 ZigBee
SQL server queries the table structure of the specified table
Source code analysis | resource loading resources
Sous - système I2C (IV): débogage I2C
Thunderbolt Chrome extension caused the data returned by the server JS parsing page data exception
【翻译】后台项目加入了CNCF孵化器
Use optimization | points that can be optimized in recyclerview
Three.js本地环境搭建
open file in 'w' mode: IOError: [Errno 2] No such file or directory
The core idea of performance optimization, dry goods sharing
【翻译】具有集中控制平面的现代应用负载平衡
Chart. JS multitooltip tag - chart js multiTooltip labels
内存泄漏工具VLD安装及使用