当前位置:网站首页>docker安装redis-简单而无坑
docker安装redis-简单而无坑
2022-06-24 19:40:00 【秃了也弱了。】
1.切换root用户
2.下载镜像文件
docker pull redis
3.创建实例并启动
mkdir -p /mydata/redis/conf
touch /mydata/redis/conf/redis.conf
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
4.redis配置文件详细配置(自行修改)
https://raw.githubusercontent.com/antirez/redis/4.0/redis.conf
想要修改配置文件,修改linux主机的/mydata/redis/conf/redis.conf即可
5.使用 redis 镜像执行 redis-cli 命令连接
docker exec -it redis redis-cli
边栏推荐
- See how sparksql supports enterprise level data warehouse
- CA Zhouji - the first lesson in 2022 rust
- find your present (2)
- 双亲委派机制
- 堆內存分配的並發問題
- 加分利器 不负所托 | 知道创宇获攻防演练防守方感谢信!
- How to integrate Huawei cloud function services in fluent
- Research Report on terahertz imaging system industry - market status analysis and development prospect forecast
- 2022-06-10 work record --js- obtain the date n days after a certain date
- ThreadLocal local thread
猜你喜欢

Online filing process
See how sparksql supports enterprise level data warehouse

电力系统| IEEE论文投稿流程

Principles of Ethernet port mirroring, link aggregation and VLAN Technology

JWT(Json Web Token)

Panorama of enterprise power in China SSD industry

HTTP的缓存控制

vulnhub Vegeta: 1

2022年高压电工考试模拟100题及在线模拟考试

【文本数据挖掘】中文命名实体识别:HMM模型+BiLSTM_CRF模型(Pytorch)【调研与实验分析】
随机推荐
Power system | IEEE paper submission process
Principles of Ethernet port mirroring, link aggregation and VLAN Technology
别再乱用了,这才是 @Validated 和 @Valid 的真正区别!!!
「ARM 架构」是一种怎样的处理器架构?
Rip protocol of dynamic routing protocol
问题求解——嵌套列表
LeetCode Algorithm 剑指 Offer II 027. 回文链表
Heavyweight! Fada is listed as a "specialized and new" enterprise
动态菜单,自动对齐
2022-06-10 工作记录--JS-获取到某一日期N天后的日期
In the era of full programming, should I give up this road?
CDN principle
win10或win11打印机无法打印
【软件工程】期末重点
Common sense of resolution
[Software Engineering] key points at the end of the period
Problèmes de concurrence dans l'allocation de mémoire en tas
剑指 Offer 42. 连续子数组的最大和
Visitor tweets tell you which groups are consuming blind boxes
堆內存分配的並發問題