当前位置:网站首页>Redis installation
Redis installation
2022-07-06 02:26:00 【Flying rookie uncle】
One 、 Stand-alone version - 6.2.6
1. Default profile
- official redis Of docker There is no configuration file in ,redis The configuration takes the default value
docker search redis
docker pull redis
docker run -p 6380:6379 --name erick_redis -d redis
# View the current redis Version of
docker exec -it erick_redis redis-server -v
# Get into redis
docker exec -it erick_redis bash
# Get into redis Command line of
redis-cli
# sign out redis Instruction line , Or quit redis Containers
exit
2. Custom configuration files
- redis Officially download one redis, And will redis Below redis.conf Copy the file out
- Customize and modify the file , Mount the container data volume to redis Medium docker in
bind 127.0.0.1 ::1 # Limit redis Locally accessible only , The line must be commented out
protected-mode no # Default yes, Turn on the protection mode , Limited to local access ;
daemonize no # Default no, Change it to yes Will cause profile mode to start redis Failure ;
databases 10 # The default is 16, You can change to 10 Verify whether the configuration file is effective
# 1. mac The console uploads files to centos Server opt file
scp redis.conf [email protected]:/opt/
# 2. Mount the configuration file in the host to docker Medium redis, In this way, there will be a redis.conf file
docker run -v /opt:/usr/local/etc/redis -p 6381:6379 -d --name szredis redis redis-server /usr/local/etc/redis/redis.conf
# /opt:/usr/local/etc/redis: opt Is equipped with redis.conf Host Directory of the file
# /usr/local/etc/redis/redis.conf: There will be this in the newly generated container redis This directory , If it is not configured, there will be no
边栏推荐
- MySQL lethal serial question 1 -- are you familiar with MySQL transactions?
- PAT甲级 1033 To Fill or Not to Fill
- ftp上传文件时出现 550 Permission denied,不是用户权限问题
- Know MySQL database
- Data preparation
- [solution] every time idea starts, it will build project
- 550 permission denied occurs when FTP uploads files, which is not a user permission problem
- 在线怎么生成富文本
- 数据准备工作
- Building the prototype of library functions -- refer to the manual of wildfire
猜你喜欢
Jisuanke - t2063_ Missile interception
在线怎么生成富文本
[depth first search] Ji Suan Ke: Betsy's trip
Overview of spark RDD
[robot library] awesome robots Libraries
RDD conversion operator of spark
[community personas] exclusive interview with Ma Longwei: the wheel is not easy to use, so make it yourself!
Sword finger offer 30 Stack containing min function
How to improve the level of pinduoduo store? Dianyingtong came to tell you
【MySQL 15】Could not increase number of max_open_files to more than 10000 (request: 65535)
随机推荐
Multiple solutions to one problem, asp Net core application startup initialization n schemes [Part 1]
Text editing VIM operation, file upload
This time, thoroughly understand the deep copy
Zero basic self-study STM32 wildfire review of GPIO use absolute address to operate GPIO
【coppeliasim】6自由度路径规划
Virtual machine network, networking settings, interconnection with host computer, network configuration
Global and Chinese market of wheelchair climbing machines 2022-2028: Research Report on technology, participants, trends, market size and share
Prepare for the autumn face-to-face test questions
Template_ Quick sort_ Double pointer
Formatting occurs twice when vs code is saved
在GBase 8c数据库中使用自带工具检查健康状态时,需要注意什么?
FTP server, ssh server (super brief)
Accident index statistics
[community personas] exclusive interview with Ma Longwei: the wheel is not easy to use, so make it yourself!
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
[eight part essay] what is the difference between unrepeatable reading and unreal reading?
[width first search] Ji Suan Ke: Suan tou Jun goes home (BFS with conditions)
RDD creation method of spark
论文笔记: 图神经网络 GAT
Initial understanding of pointer variables