当前位置:网站首页>Docker install redis
Docker install redis
2022-07-23 16:54:00 【Meta39】
Look at the mirror image
docker search redis
Download mirroring
You can also check the image docker hub lookup
《 Official query image and version number 》
docker pull Image name : Version number
docker pull redis:6.2.6
start-up redis And use the configuration file of the host
The host computer creates a folder to store redis.conf
establish /docker_data/redis/data Folders are used for storing redis The data of
mkdir /docker_data/redis/data/
establish redis.conf The configuration file , This file can go to redis Just find a copy and paste on the official website .
vim /docker_data/redis/redis.conf
Comment out bind 127.0.0.1
protected-mode no
daemonize yes
start-up redis And use the host configuration file and the folder of the host to store data
docker run -p 6379:6379 --name redis6.2.6 --privileged=true -v /docker_data/redis/redis.conf:/etc/redis/redis.conf -v /docker_data/redis/data:/data -d redis:6.2.6 redis-server /etc/redis/redis.conf
Open the firewall 6379 port , Run Internet access
firewall-cmd --zone=public --add-port=6379/tcp --permanent
Firewall must be restarted
firewall-cmd --reload
Enter into redis Of cli prove redis Successful launch
docker exec -it redis6.2.6 /bin/bash
restart redis Prove that the configuration file of the host is used
Modify host redis.conf Profile's database 16 by 10
docker restart redis6.2.6
Get into redis
docker exec -it redis6.2.6 /bin/bash
redis-cli
I set up 15 Databases , exceed 15 Just report an error ,redis The library of is from 0 At first, so 15 Yes 0-14
127.0.0.1:6379> select 15
(error) ERR DB index is out of range
127.0.0.1:6379> select 14
OK
边栏推荐
- Bag of tricks for image classification "with convolutional neural networks"
- uni-app进阶之认证【day12】
- 无心剑英汉双语诗006.《致爱妻》
- NodeJs实现token登录注册(KOA2)
- Nifi 1.16.3 集群搭建+kerberos+用户认证
- 解决data functions should return an object 并(Property “visible“ must be accessed with “$data.visible“)
- RISC-V基金会董事谭章熹:RISC-V,从边缘逐渐向中央扩展
- Leetcode-67. binary sum
- 灰色预测(MATLAB)
- 实时疫情数据可视化分析
猜你喜欢

Bag of Tricks for Image Classification with Convolutional Neural Networks(卷积神经网络在图像分类中的技巧)

软件体系结构

RISC-V基金会董事谭章熹:RISC-V,从边缘逐渐向中央扩展

(resolved) idea compilation gradle project prompt error no symbol found

微机原理与技术接口随堂练习

《STM32MP1 M4裸机CubeIDE开发指南》第六章 STM32Cube固件包

USB基础

20220721 beaten content

General paging function

基于APISIX的basic-auth插件对Minio文件上传功能进行授权
随机推荐
The working principle of PLL. For example, how can our 8MHz crystal oscillator make MCU work at 48mhz or 72mhz
Taishan Office Technology Lecture: layout drawing analysis of paragraph borders
软件体系结构
怎么购买收益在6%以上的理财产品?
Object.defineProperty方法、数据代理
拼多多APP商品详情接口获取activity_id值(拼多多activity_id接口)
深度学习卷积神经网络论文研读-AlexNet
NodeJs实现token登录注册(KOA2)
ts封装localstorage类,存储信息
主成分分析(MATLAB)
pip报错Could not find a version that satisfies the...No matching distribution
Numpy 数据分析基础知识第一阶段(NumPy基础)
移动、电信、联通:5G To B的花式解法
【C语言】结构体、枚举和联合体
同花顺上选择券商,网上客户经理开户安全吗
Convolutional neural network model -- googlenet network structure and code implementation
【笔记】线性回归
go语言的基础语法(变量、常量、基本数据类型,for、switch,case、数组、slice(切片)、make和new、map)
实时疫情数据可视化分析
微机原理与技术接口课后作业总结