当前位置:网站首页>Docker deploys the stand-alone version of redis - modify the redis password and persistence method
Docker deploys the stand-alone version of redis - modify the redis password and persistence method
2022-07-27 05:47:00 【Code world of super Duoduo and Liu baobao】
List of articles
Preface
Deployed several times before redis, Pull it down and start it directly , Not setting too many properties . Later, I deployed a set , But the second deployment forgot the specific process , This time, make up your mind to record .
One 、 PULL redis Image file
The latest version of wunaola :docker pull redis
Two 、 If you mount files and directories
1. Create folder
We will /data/redis File path as redis The mount directory for
Then create this folder first : mkdirs /data/redis/
2. Use the configuration file to start
You cannot mount files directly when there is no such file in the mount directory , So we must have this file in advance
1 Start first redis
Since the start of this redis Middle handle this conf Copy the file
2 Download one from the Internet conf file
http://www.redis.cn/download.html
3 modify conf The configuration file
1. take bind 127.0.0.1 Comment out , Give Way redis Can be accessed externally
2.protected-mode yes Comment out
3.requirepass 123456 Set the password
You can also set properties such as persistence mode , Own Baidu
4 start-up redis
docker run -p 6379:6379 --name redis -v /data/redis/redis.conf:/etc/redis/redis.conf -v /data/redis/data:/data -d redis redis-server /etc/redis/redis.conf --appendonly yes
Mount profile and data Catalog , And use redis.conf File to start the ,appendonly by redis Persistence
summary
More records can solve the problem faster
边栏推荐
- Face brushing payment will never be out of date, but will continue to change
- ==,===,Object.is
- What are alpha and beta tests?
- Personal collection code cannot be used for business collection
- How to use for..Of to traverse objects in JS
- 期货开户公司交返怎么申请?
- How to judge whether a property belongs to an instance object or inherits from a constructor in JS
- In the future, face brushing payment can occupy a lot of market share
- 什么是Alpha和Beta测试?
- dbswitch数据迁移数据增量时如何不覆盖目标源数据
猜你喜欢

Graph-node部署及测试

Which futures company has a low handling fee and a high refund?

市场冷空气来袭,SeekTiger如何逆流而上?

个人收款码不得用于经营收款

MOVE PROTOCOL推出测试版,更可“0撸”参与P2E

期货开户要和客户经理详谈政策

Basic layout of the page

You can't even do a simple function test well. What do you take to talk about salary increase with me?

根据文本自动生成UML时序图(draw.io格式)

Prototype and prototype chain in JS
随机推荐
我想不通,MySQL 为什么使用 B+ 树来作索引?
How to judge whether a property belongs to an instance object or inherits from a constructor in JS
Arguments class array in JS
Rating and inquiry details of futures companies
Web3 traffic aggregation platform starfish OS interprets the "p2e" ecosystem of real business
刷脸支付永远不会过时只会不断的变革
AQUANEE将在近期登陆Gate以及BitMart,低位布局的良机
==,===,Object.is
给测试小姐姐的第三封信 | ORACLE存储过程知识分享和测试说明
Page configuration
Web2.0 giants have deployed VC, and tiger Dao VC may become a shortcut to Web3
MySQL二级索引中的主键——MySQL存在大量相同数据分页查询优化
How to open a general commodity futures account
What are the conditions and procedures for opening crude oil futures accounts?
How to apply for the return of futures account opening company?
NFT新范式,OKALEIDO创新NFT聚合交易生态
Web3流量聚合平台Starfish OS,诠释真正商业的“P2E”生态
Application of store Redux in project
定点一键查询GUI编程的设计与开发
Dimitra and ocean protocol interpret the secrets behind agricultural data