当前位置:网站首页>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
边栏推荐
- Win10 or win11 printer cannot print
- Relationnet++: a representation of fusion of multiple detection targets based on transformer | neurips 2020
- 【Mongodb】READ_ ME_ TO_ RECOVER_ YOUR_ Data, the database is deleted maliciously
- In the era of full programming, should I give up this road?
- The core concept of JMM: happens before principle
- ThreadLocal memory leak
- Solution to the login error of tangdou people
- OSPF basic content
- 源码阅读 | OpenMesh读取文本格式stl的过程
- Selection and comparison of message oriented middleware MQ
猜你喜欢

C#学习两年的增删改查和C#导入导出(去重)案例

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

The usage difference between isempty and isblank is so different that so many people can't answer it

别再乱用了,这才是 @Validated 和 @Valid 的真正区别!!!

envoy获取客户端真实IP

In the era of full programming, should I give up this road?

Virtual private network foundation

机器学习编译入门课程学习笔记第一讲 机器学习编译概述

In the multi network card environment, the service IP registered by Nacos is incorrect, resulting in inaccessible services

【ROS玩转Turtlesim小海龟】
随机推荐
Research Report on market supply and demand and strategy of China's solar charging controller industry
Code farmers should also understand the IPv4 subnet division of point networks
Layer 2 and layer 3 forwarding principle based on VLAN
问题求解——嵌套列表
High level application of SQL statements in MySQL database (I)
2022-06-16 work record --js- judge the number of digits in string type digits + judge the number of digits in numeric type digits + limit the text length (display n words at most, exceeding...)
[Software Engineering] key points at the end of the period
【WSL】SSH 远程连接及宿主机端口转发配置
大厂面试必问:如何解决TCP可靠传输问题?8张图带你详细学习
In the multi network card environment, the service IP registered by Nacos is incorrect, resulting in inaccessible services
Data center basic network platform
Visitor tweets tell you which groups are consuming blind boxes
EPICS记录参考3 -- 所有记录都有的字段
Servlet
Problèmes de concurrence dans l'allocation de mémoire en tas
ThreadLocal内存泄漏问题
vulnhub Vegeta: 1
堆內存分配的並發問題
win10或win11打印机无法打印
开发规范~参数校验异常、异常返回提示切面