当前位置:网站首页>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
边栏推荐
- Minecraft 1.18.1、1.18.2模组开发 22.狙击枪(Sniper Rifle)
- Concept of storage engine
- Initial understanding of pointer variables
- Pangolin Library: subgraph
- Computer graduation design PHP college classroom application management system
- Bigder:34/100 面试感觉挺好的,没有收到录取
- 剑指 Offer 29. 顺时针打印矩阵
- VIM usage guide
- [eight part essay] what is the difference between unrepeatable reading and unreal reading?
- Campus second-hand transaction based on wechat applet
猜你喜欢
零基础自学STM32-复习篇2——使用结构体封装GPIO寄存器
Visualstudio2019 compilation configuration lastools-v2.0.0 under win10 system
[depth first search notes] Abstract DFS
数据工程系列精讲(第四讲): Data-centric AI 之样本工程
Black high-end responsive website dream weaving template (adaptive mobile terminal)
LeetCode 103. Binary tree zigzag level order transverse - Binary Tree Series Question 5
Adapter-a technology of adaptive pre training continuous learning
Concept of storage engine
RDD partition rules of spark
Minecraft 1.18.1、1.18.2模组开发 22.狙击枪(Sniper Rifle)
随机推荐
Httprunnermanager installation (III) - configuring myql Database & initialization data under Linux
Global and Chinese markets of screw rotor pumps 2022-2028: Research Report on technology, participants, trends, market size and share
Executing two identical SQL statements in the same sqlsession will result in different total numbers
【MySQL 15】Could not increase number of max_open_files to more than 10000 (request: 65535)
高数_向量代数_单位向量_向量与坐标轴的夹角
Global and Chinese markets of general purpose centrifuges 2022-2028: Research Report on technology, participants, trends, market size and share
Spark accumulator
2022 China eye Expo, Shandong vision prevention and control exhibition, myopia, China myopia correction Exhibition
Xshell 7 Student Edition
[community personas] exclusive interview with Ma Longwei: the wheel is not easy to use, so make it yourself!
PHP campus financial management system for computer graduation design
[robot hand eye calibration] eye in hand
[width first search] Ji Suan Ke: Suan tou Jun goes home (BFS with conditions)
【clickhouse】ClickHouse Practice in EOI
Use Scrollview and tabhost to realize vertical scrollbars and tabs
Template_ Quick sort_ Double pointer
【机器人库】 awesome-robotics-libraries
Method of changing object properties
Y a - t - il des cas où sqlcdc surveille plusieurs tables et les associe à une autre? Tout fonctionne dans MySQL
[Wu Enda machine learning] week5 programming assignment EX4 - neural network learning