当前位置:网站首页>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边栏推荐
- 用docker 連接mysql的過程
- As a leader, how to control the code version and demand development when the epidemic comes| Community essay solicitation
- A2L file parsing based on CAN bus (2)
- Add automatic model generation function to hade
- Thunderbolt Chrome extension caused the data returned by the server JS parsing page data exception
- [shutter] banner carousel component (shutter_wiper plug-in | swiper component)
- [leectode 2022.2.15] lucky numbers in the matrix
- [C语言]给账号密码进行MD5加密
- I2C 子系统(四):I2C debug
- C language beginner level - pointer explanation - paoding jieniu chapter
猜你喜欢

Add MDF database file to SQL Server database, and the error is reported

A2L file parsing based on CAN bus (2)

Kubernetes cluster log and efk architecture log scheme
![[shutter] banner carousel component (shutter_wiper plug-in | swiper component)](/img/a6/5c97ef3f34702b83ebf0511501d757.gif)
[shutter] banner carousel component (shutter_wiper plug-in | swiper component)

I2C 子系统(二):I3C spec

Pytest (6) -fixture (Firmware)

Add automatic model generation function to hade

Practice of traffic recording and playback in vivo

I2C subsystem (III): I2C driver

Joking about Domain Driven Design (III) -- Dilemma
随机推荐
"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
The difference between left value and right value in C language
MATLAB小技巧(24)RBF,GRNN,PNN-神经网络
sql server数据库添加 mdf数据库文件,遇到的报错
Joking about Domain Driven Design (III) -- Dilemma
Mathematical statistics -- Sampling and sampling distribution
Didi programmers are despised by relatives: an annual salary of 800000 is not as good as two teachers
Andwhere multiple or query ORM conditions in yii2
Interview stereotyped version
Counter统计数量后,如何返回有序的key
[C language] MD5 encryption for account password
tensorflow转pytorch笔记;tf.gather_nd(x,y)转pytorch
Can netstat still play like this?
random shuffle注意
Check log4j problems using stain analysis
Segmentation fault occurs during VFORK execution
The Linux server needs to install the agent software EPS (agent) database
你真的懂继电器吗?
Reset or clear NET MemoryStream - Reset or Clear . NET MemoryStream
Force freeing memory in PHP