当前位置:网站首页>docker安装redis
docker安装redis
2022-07-03 02:56:00 【玩代码】
1.下载官网镜像
docker pull redis
2.创建redis目录和conf文件
cd /mydata/
mkdir redis
mkdir redis/conf
touch /mydata/redis/conf/redis.conf
3.编辑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.conf
5.查看redis
docker ps
6.进入redis客户端
docker exec -it redis redis-cli
边栏推荐
- xiaodi-笔记
- HW initial preparation
- Error invalid bound statement (not found): com ruoyi. stock. mapper. StockDetailMapper. XXXX solution
- [hcia]no.15 communication between VLANs
- Basic operation of binary tree (C language version)
- sql server 查詢指定錶的錶結構
- Counter统计数量后,如何返回有序的key
- I2C 子系統(四):I2C debug
- Update and return document in mongodb - update and return document in mongodb
- Source code analysis | layout file loading process
猜你喜欢
random shuffle注意
用docker 連接mysql的過程
左连接,内连接
Mathematical statistics -- Sampling and sampling distribution
怎么将yolov5中的PANet层改为BiFPN
Pytest (6) -fixture (Firmware)
SQL statement
Baidu map - surrounding search
Deep reinforcement learning for intelligent transportation systems: a survey paper reading notes
一文带你了解 ZigBee
随机推荐
迅雷chrome扩展插件造成服务器返回的数据js解析页面数据异常
HTB-Devel
Can netstat still play like this?
[Fuhan 6630 encodes and stores videos, and uses RTSP server and timestamp synchronization to realize VLC viewing videos]
Andwhere multiple or query ORM conditions in yii2
Sous - système I2C (IV): débogage I2C
Random Shuffle attention
【翻译】后台项目加入了CNCF孵化器
[translation] the background project has joined the CNCF incubator
当lambda没有输入时,是何含义?
[C语言]给账号密码进行MD5加密
Yiwen takes you to know ZigBee
Build a private cloud disk cloudrev
Add automatic model generation function to hade
Classes and objects - initialization and cleanup of objects - constructor call rules
The Linux server needs to install the agent software EPS (agent) database
Sqlserver row to column pivot
Deep Reinforcement Learning for Intelligent Transportation Systems: A Survey 论文阅读笔记
leetcode540
Update and return document in mongodb - update and return document in mongodb