In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
1. Pull the official 5.0.3 image
[root@localhost ~] # docker pull redis:5.0.3
Download completed
[root@localhost ~] # docker pull redis:5.0.35.0.3: Pulling from library/redisf7e2b70d04ae: Pull complete 421427137c28: Pull complete 4af7ef63ef0f: Pull complete b858087b3517: Pull complete 2aaf1944f5eb: Pull complete 8270b5c7b90d: Pull complete Digest: sha256:4be7fdb131e76a6c6231e820c60b8b12938cf1ff3d437da4871b9b2440f4e385Status: Downloaded newer image for redis:5.0.3
2. Create a mount directory
1. Create a mount folder
[root@localhost ~] # mkdir-p / root/redis/data / root/redis/conf [root@localhost ~] # cd redis/ [root@localhost redis] # lsconf data
2. Create redis.conf
Create the file redis.conf in the / root/redis/conf directory
Touch redis.conf
Show table of contents
[root@localhost redis] # cd conf/ [root@localhost conf] # ls [root@localhost conf] # touch redis.conf [root@localhost conf] # lsredis.conf [root@localhost conf] #
Create a redis container
Docker run-d-- name redis- p 6379VAND root/redis/conf/redis.conf:/redis.conf-v / root/redis/data:/data redis:5.0.3 redis-server-- appendonly yes
Parameter description:
-d running in the background
The-p port maps to the port of the host
-v Mount the host directory to the container directory
Redis-server-- appendonly yes: execute the redis-server startup command in the container and open the redis persistent configuration
1. Start redis
The error in startup is as follows:
[root@localhost] # docker run-d-- name redis- p 637915 6379-v / root/redis/conf/redis.conf:/redis.conf-v / root/redis/data:/data redis:5.0.3 redis-server-- appendonly yes9bc537c19ff0ad76727b5215da8cba4223c5ff97f1d9a53585d573ca71fd8c0cdocker: Error response from daemon: driver failed programming external connectivity on endpoint redis (fa297144f8d0c958288bb35a94ffbec545d348f2ff9f55a5b573f3d9a0354ace): (iptables failed: iptables-- wait-t nat-A DOCKER-p tcp-d0 / 0-- dport 6379-j DNAT-- to-destination 172.17.0 .3Plus 6379!-I docker0: iptables: No chain/target/match by that name. (exit status 1).
Description: the custom chain DOCKER defined when the docker service starts is cleared for some reason
Restart docker services and regenerate custom chain DOCKER
Solution:
Step 1, restart docker
Step 2, start the container
Systemctl restart dockerdocker start foo
2. If the container is created successfully, start the redis container.
Docker start redis
1. Startup failure: iptables: No chain/target/match by that name error occurs when you start the container
Rough solution
Restart docker
2. Start the display normally.
IV. Client connection
I use RedisDesktopManager.
The above is the whole content of this article, I hope it will be helpful to your study, and I also hope that you will support it.
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.