当前位置:网站首页>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
边栏推荐
- Multiple solutions to one problem, asp Net core application startup initialization n schemes [Part 1]
- Exness: Mercedes Benz's profits exceed expectations, and it is predicted that there will be a supply chain shortage in 2022
- Derivation of Biot Savart law in College Physics
- Bigder: I felt good about the 34/100 interview, but I didn't receive the admission
- The intelligent material transmission system of the 6th National Games of the Blue Bridge Cup
- Minecraft 1.18.1, 1.18.2 module development 22 Sniper rifle
- Minecraft 1.18.1、1.18.2模组开发 22.狙击枪(Sniper Rifle)
- 【coppeliasim】6自由度路径规划
- Use the list component to realize the drop-down list and address list
- How to check the lock information in gbase 8C database?
猜你喜欢

Reset nodejs of the system

Crawler (9) - scrape framework (1) | scrape asynchronous web crawler framework

2022年版图解网络PDF

Keyword static

RDD conversion operator of spark

Httprunnermanager installation (III) - configuring myql Database & initialization data under Linux

RDD partition rules of spark

Zero basic self-study STM32 wildfire review of GPIO use absolute address to operate GPIO

Computer graduation design PHP part-time recruitment management system for College Students

剑指 Offer 29. 顺时针打印矩阵
随机推荐
Social networking website for college students based on computer graduation design PHP
vs code保存时 出现两次格式化
729. 我的日程安排表 I / 剑指 Offer II 106. 二分图
HDU_ p1237_ Simple calculator_ stack
SQL statement
Adapter-a technology of adaptive pre training continuous learning
Easy to use js script
Executing two identical SQL statements in the same sqlsession will result in different total numbers
Concept of storage engine
General process of machine learning training and parameter optimization (discussion)
I like Takeshi Kitano's words very much: although it's hard, I will still choose that kind of hot life
SSM assembly
Dachang image library
Use Scrollview and tabhost to realize vertical scrollbars and tabs
[untitled] a query SQL execution process in the database
[depth first search notes] Abstract DFS
Exness: Mercedes Benz's profits exceed expectations, and it is predicted that there will be a supply chain shortage in 2022
550 permission denied occurs when FTP uploads files, which is not a user permission problem
模板_快速排序_双指针
2020.02.11