当前位置:网站首页>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边栏推荐
- [Fuhan 6630 encodes and stores videos, and uses RTSP server and timestamp synchronization to realize VLC viewing videos]
- 怎么将yolov5中的PANet层改为BiFPN
- Add automatic model generation function to hade
- [fluent] future asynchronous programming (introduction | then method | exception capture | async, await keywords | whencomplete method | timeout method)
- What does "where 1=1" mean
- 用docker 連接mysql的過程
- [fluent] listview list (map method description of list set | vertical list | horizontal list | code example)
- random shuffle注意
- From C to capable -- use the pointer as a function parameter to find out whether the string is a palindrome character
- Check log4j problems using stain analysis
猜你喜欢

I2C 子系統(四):I2C debug

HW initial preparation

迅雷chrome扩展插件造成服务器返回的数据js解析页面数据异常
![[shutter] setup of shutter development environment (supplement the latest information | the latest installation tutorial on August 25, 2021)](/img/65/c1fe95f8c391394f7ff1b75c7d75b6.jpg)
[shutter] setup of shutter development environment (supplement the latest information | the latest installation tutorial on August 25, 2021)

Privatization lightweight continuous integration deployment scheme -- 01 environment configuration (Part 2)

Deep Reinforcement Learning for Intelligent Transportation Systems: A Survey 论文阅读笔记

Check log4j problems using stain analysis

Add automatic model generation function to hade
![[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)

Opengauss database development and debugging tool guide
随机推荐
内存泄漏工具VLD安装及使用
【富瀚6630编码存录像,用rtsp服务器及时间戳同步实现vlc观看录像】
[hcia]no.15 communication between VLANs
Concrete CMS vulnerability
leetcode540
Serious security vulnerabilities reported by moxa mxview network management software
Process the dataset and use labelencoder to convert all IDs to start from 0
Random shuffle note
Reset or clear NET MemoryStream - Reset or Clear . NET MemoryStream
"Analysis of 43 cases of MATLAB neural network": Chapter 43 efficient programming skills of neural network -- Discussion Based on the characteristics of the new version of MATLAB r2012b
疫情当头,作为Leader如何进行代码版本和需求开发管控?| 社区征文
Deep Reinforcement Learning for Intelligent Transportation Systems: A Survey 论文阅读笔记
Cron表达式介绍
I2C subsystem (III): I2C driver
从C到Capable-----利用指针作为函数参数求字符串是否为回文字符
为什么会选择框架?选择什么样的框架
Three.js本地环境搭建
How to limit the size of the dictionary- How to limit the size of a dictionary?
Add automatic model generation function to hade
xiaodi-笔记