In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This paper realizes the function.
Redis installation tutorial in windows
Redis is installed on centos
Install Redis using docker
Realization environment
Centos7.3
Docker
VM virtual machine
Window installation redis tutorial
The version of redis on window is up to 3.2
Download address: https://github.com/MSOpenTech/redis/releases
When you go inside, you will see such a page. Click the mouse arrow to download.
Then extract the downloaded file and put it under your own drive letter.
Click redis-server to start the redis service, and then open a terminal to use redis
Window installation of redis is very simple, you can use window to learn in the learning process, but the actual work is still based on linux.
Linux install Redis
On linux you can install using either yum or source code, where Kaka uses a compiled installation. Installation version 4.0
Download the installation package for redis
Wget http://download.redis.io/releases/redis-4.0.8.tar.gz
Extract the installation package tar xzvf redis-4.0.8.tar.gz
Enter the installation package cd redis-4.0.8
Execute make
Then move redis-4.0.8 to / usr/local
Mv redis-4.0.8 / usr/local
Modify redis.conf configuration
Set password
Note bind 127.0.0.1 (this can only be connected locally, so it needs to be commented out)
Default is no daemon mode
Exit after the above operations.
Then enter / sur/local/redis/src execution
With redis, keep in mind that you need to enter a password. If you don't want to enter a password, you can do this without setting a password.
This is the installation of redis on linux
Here, I would like to talk a little bit about shutting down the redis service. This is not turned off, because the password is set, so we need to add the password to disable the redis service.
You can see that there is a redis process running now
Correct shutdown mode redis-cli-a fang1996 shutdown
Docker install redis
Premise. You have docker on your centos.
Pull the image of redis4.0 first.
Docker pull redis:4.0
View image docker image ls
At this time, the redis image has been pulled down.
I have defined a network 172.10.0.0Mab 16 here.
Docker network create-subnet=172.10.0.0/16 mynetwork
Create the redis container: docker run-itd-- name redis-- net mynetwork-p 6380 name redis 6379-- ip 172.10.0.2 redis:4.0
Enter docker exec-it redis / bin/bash into the redis container
At this time, there is no redis.conf configuration file in the container. Exit the container and copy a copy to the redis container.
Docker cp / usr/local/redis-4.0.8/redis.conf a782d31cc4ac:/etc/
Then you can use redis.conf to turn it on.
When creating a container, you only need to add redis-server / etc/redis.conf to the command
test
That's all the process.
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.