当前位置:网站首页>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
边栏推荐
- HDU_p1237_简单计算器_stack
- 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
- Global and Chinese markets of general purpose centrifuges 2022-2028: Research Report on technology, participants, trends, market size and share
- 0211 embedded C language learning
- 剑指 Offer 30. 包含min函数的栈
- HDU_ p1237_ Simple calculator_ stack
- Overview of spark RDD
- [solution] every time idea starts, it will build project
- 【coppeliasim】高效传送带
- 【机器人库】 awesome-robotics-libraries
猜你喜欢

Use image components to slide through photo albums and mobile phone photo album pages

How to generate rich text online

A basic lintcode MySQL database problem

Concept of storage engine

SPI communication protocol
![[solution] add multiple directories in different parts of the same word document](/img/22/32e43493ed3b0b42e35ceb9ab5b597.jpg)
[solution] add multiple directories in different parts of the same word document

MySQL lethal serial question 1 -- are you familiar with MySQL transactions?

高数_向量代数_单位向量_向量与坐标轴的夹角

爬虫(9) - Scrapy框架(1) | Scrapy 异步网络爬虫框架

Paper notes: graph neural network gat
随机推荐
高数_向量代数_单位向量_向量与坐标轴的夹角
2020.02.11
Multiple solutions to one problem, asp Net core application startup initialization n schemes [Part 1]
Keyword static
This time, thoroughly understand the deep copy
Virtual machine network, networking settings, interconnection with host computer, network configuration
FTP server, ssh server (super brief)
有沒有sqlcdc監控多張錶 再關聯後 sink到另外一張錶的案例啊?全部在 mysql中操作
Computer graduation design PHP college classroom application management system
Grabbing and sorting out external articles -- status bar [4]
Crawler (9) - scrape framework (1) | scrape asynchronous web crawler framework
PHP campus movie website system for computer graduation design
Text editing VIM operation, file upload
Template_ Find the reverse pair of permutations_ Sort based on merge
Apicloud openframe realizes the transfer and return of parameters to the previous page - basic improvement
[robot library] awesome robots Libraries
有没有sqlcdc监控多张表 再关联后 sink到另外一张表的案例啊?全部在 mysql中操作
[postgraduate entrance examination English] prepare for 2023, learn list5 words
729. 我的日程安排表 I / 剑指 Offer II 106. 二分图
The intelligent material transmission system of the 6th National Games of the Blue Bridge Cup