当前位置:网站首页>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边栏推荐
- HTB-Devel
- The process of connecting MySQL with docker
- Kubernetes family container housekeeper pod online Q & A?
- 二维格式数组格式索引下标连续问题导致 返回json 格式问题
- Error when installing MySQL in Linux: starting mysql The server quit without updating PID file ([FAILED]al/mysql/data/l.pid
- Two dimensional format array format index subscript continuity problem leads to return JSON format problem
- Deep learning: multi-layer perceptron and XOR problem (pytoch Implementation)
- Pytest (6) -fixture (Firmware)
- 从C到Capable-----利用指针作为函数参数求字符串是否为回文字符
- JMeter performance test JDBC request (query database to obtain database data) use "suggestions collection"
猜你喜欢

Opengauss database development and debugging tool guide

Today, it's time to copy the bottom!

Installation and use of memory leak tool VLD

MATLAB小技巧(24)RBF,GRNN,PNN-神经网络
![[principles of multithreading and high concurrency: 1_cpu multi-level cache model]](/img/c7/6b5ab4ff7379bfccff7cdbb358ff8f.jpg)
[principles of multithreading and high concurrency: 1_cpu multi-level cache model]

The Linux server needs to install the agent software EPS (agent) database

Can netstat still play like this?

vfork执行时出现Segmentation fault

The process of connecting MySQL with docker

分布式事务
随机推荐
tensor中的append应该如何实现
tensorflow转pytorch笔记;tf.gather_nd(x,y)转pytorch
The core idea of performance optimization, dry goods sharing
I2C 子系统(一):I2C spec
当lambda没有输入时,是何含义?
A2L file parsing based on CAN bus (2)
How to use asp Net MVC identity 2 change password authentication- How To Change Password Validation in ASP. Net MVC Identity 2?
Random shuffle note
Deep reinforcement learning for intelligent transportation systems: a survey paper reading notes
Error invalid bound statement (not found): com ruoyi. stock. mapper. StockDetailMapper. XXXX solution
Andwhere multiple or query ORM conditions in yii2
Super easy to use logzero
Cancer biopsy instruments and kits - market status and future development trends
random shuffle注意
处理数据集,使用LabelEncoder将所有id转换为从0开始
Your family must be very poor if you fight like this!
Apple releases MacOS 11.6.4 update: mainly security fixes
Random Shuffle attention
ASP. Net core 6 framework unveiling example demonstration [02]: application development based on routing, MVC and grpc
Kubernetes cluster log and efk architecture log scheme