In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Xiaobian to share with you how to install docker redis 5.0.7 and mount external configuration and data, I hope you have something to gain after reading this article, let's discuss it together!
Redis is an open-source, web-enabled, memory-based and persistent log type, Key-Value NoSQL database written in ANSI C, and provides APIs in multiple languages.
environment
CentOS Linux release 7.7.1908 (Core)
Pull redis 5.0.7 mirror
docker pull redis:5.0.7
Create mount directory
mkdir -p /home/app/redis/confmkdir -p /home/app/redis/data
Download redis.conf
redis.conf Address
Go to the directory and download redis.conf
cd /home/app/redis/confwget https://raw.githubusercontent.com/antirez/redis/5.0/redis.conf
Modify redis.conf
Comment symbol # 1. Notes bind 127.0.0.1 2. Protected-mode yes modified to protected-mode no 3. Add requirepass yourpassword Note: Steps 1 and 2 are intended for remote connection to redis. If local access is required, no modification is required.
Creating a Startup Container
docker run --restart=always -d --privileged=true -p 6379:6379 -v /home/app/redis/conf/redis.conf:/etc/redis/redis.conf -v /home/app/redis/data:/data --name redis redis:5.0.7 redis-server /etc/redis/redis.conf --appendonly yes
parameter interpretation
--restart=always -> Start the container, container abnormal automatic restart-d -> Start container as daemon--privileged=true -> Increase permissions in container-p 6379:6379 -> Binding host ports-v /home/app/redis/conf/redis.conf:/etc/redis/redis.conf -> Mapping configuration files-v /home/app/redis/data:/data -> Mapping data directory--name redis -> Specify container name--appendonly yes -> Open data persistence After reading this article, I believe you have a certain understanding of "docker how to install redis 5.0.7 and mount external configuration and data". If you want to know more about it, please pay attention to the industry information channel. Thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.