当前位置:网站首页>Redis installation and deployment (windows/linux)
Redis installation and deployment (windows/linux)
2022-07-02 09:13:00 【Axi-ZYTao】
Redis Installation and deployment (Windows/Linux)
One 、Windows install
1、 Preparation before installation
(1) Get ready redis Installation package , Decompress well ,
(2) Add environment variables to the absolute path after decompression , System variables path in .
2、 Start the server service

Double click redis-server.exe File and keep the window open ( Do not shut down. )
3、 Start the client to connect to the server
Double click... Under the installation directory redis-cli.exe file , perform ping command , Downlink appearance "PONG" The connection is successful .
4、 Deploy Redis service
Open the command prompt in the installation directory , Execute the following command .( notes : Even if the system environment variable is configured , This command still needs to be in Redis Execute under the installation directory , Otherwise I can't find it redis.windows.conf The document will report an error ; The configuration file parameter can be redis.windows.conf, It can also be redis.windows-service.conf, Which parameter is executed here , follow-up redis The configuration file modifies the corresponding file )
redis-server.exe --service-install redis.windows.conf --loglevel verbose
appear Redis sucessfully installed as a service be Redis Service installed successfully , You can open the task manager to view .
Modify the configuration file redis-windows.conf Password to connect to the database in ;
5、 Test service
Start the server service , Open the customer service terminal , Test service ;
Client side test , Double-click to open redis-cli.exe, Input ping verification
cmd Use the following command to verify :
redis-cli.exe -h 127.0.0.1 -p 6379 -a requirepass
Be careful :-h Server address -p Specify port number -a The password set in the configuration file to connect to the database , No password by default , Can be found in redis-windows.conf Middle configuration
Can be connected , Description test successful .
6、 Desktop management tools
Download address of free desktop tools :https://github.com/qishibo/AnotherRedisDesktopManager/releases
After logging in and connecting, the following figure appears :
Two 、Linux install
1、 Preparation before installation
linux Install first wget
yum -y install wget

2、 Download and install redis
# Enter the installation system path
# cd /usr/local
# Create downloads redis Directory to install the package
# mkdir soft
# Enter the created directory path
# cd /usr/local/soft
# Download Online redis Installation package
# wget http://download.redis.io/releases/redis-5.0.7.tar.gz

# decompression redis Installation package
# tar -zxvf redis-5.0.7.tar.gz
# Enter the redis Installation package
# cd redis-5.0.7
Compile run environment ( Will load something , It's slow )
# make
hold redis Install under directory src The six green files in the file are copied to /usr/local/bin Under the path ;
redis-server // Start the service
redis-benchmark // Test performance
redis-check-aof // Check aof Persistent files
redis-sentinel
redis-cli // client
meanwhile , hold redis.conf The configuration file is also copied to the path /usr/local/bin, There are the following documents 
3、 Modify the startup configuration file
Redis It will not start in the background by default , Modify the configuration file
# Edit profile
# vi /usr/local/bin/redis.conf
# :set nu ( Display row number , perhaps :set number)
# stay redis.conf The first 136 Near the line , take daemonize Change it to yes 
start-up redis Check the process
# redis-server redis.conf
# ps -ef | grep redis

4、 Start client , port 6379
# redis-cli -p 6379
Test whether the connection is successful , Input ping, appear pong Description connection successful
Open a new window , Check the process , Client started successfully 
5、 Formal closure redis service
stay redis-cli in
# shutdown ( Close the service )
# exit ( Not connected... Will be displayed , then exit sign out )
Inquire about redis process , If it doesn't exist, it will be closed successfully
6、 uninstall redis
close redis-server service , close redis-cli service
Delete and redis Installation related files ( You can use locate perhaps find lookup )
# rm -rf /usr/local/bin/redis-*
# rm -rf /usr/local/redis
边栏推荐
- Chrome浏览器标签管理插件–OneTab
- JVM指令助记符
- 别找了,Chrome浏览器必装插件都在这了
- Matplotlib剑客行——布局指南与多图实现(更新)
- Pdf document of distributed service architecture: principle + Design + practice, (collect and see again)
- Cloudreve自建云盘实践,我说了没人能限制得了我的容量和速度
- 数构(C语言--代码有注释)——第二章、线性表(更新版)
- Oracle 相关统计
- Leetcode sword finger offer brush questions - day 23
- 微服务实战|微服务网关Zuul入门与实战
猜你喜欢

Watermelon book -- Chapter 5 neural network

Microservice practice | declarative service invocation openfeign practice

C language - Blue Bridge Cup - 7 segment code

Data type case of machine learning -- using data to distinguish men and women based on Naive Bayesian method

Hengyuan cloud_ Can aiphacode replace programmers?

Number structure (C language) -- Chapter 4, compressed storage of matrices (Part 2)

Programmers with ten years of development experience tell you, what core competitiveness do you lack?

C4D quick start tutorial - Chamfer

Cloudreve自建云盘实践,我说了没人能限制得了我的容量和速度

深入剖析JVM是如何执行Hello World的
随机推荐
2022/2/14 summary
C language implementation of mine sweeping game
Microservice practice | fuse hytrix initial experience
Jd.com interviewer asked: what is the difference between using on or where in the left join association table and conditions
Matplotlib剑客行——初相识Matplotlib
Cloud computing in my eyes - PAAS (platform as a service)
Sentinel reports failed to fetch metric connection timeout and connection rejection
「面试高频题」难度大 1.5/5,经典「前缀和 + 二分」运用题
【Go实战基础】gin 如何绑定与使用 url 参数
[staff] time mark and note duration (staff time mark | full note rest | half note rest | quarter note rest | eighth note rest | sixteenth note rest | thirty second note rest)
将一串数字顺序后移
MYSQL安装出现问题(The service already exists)
[go practical basis] how can gin get the request parameters of get and post
Oracle related statistics
Leetcode sword finger offer brush questions - day 22
Knife4j 2.X版本文件上传无选择文件控件问题解决
Move a string of numbers backward in sequence
长篇总结(代码有注释)数构(C语言)——第四章、串(上)
「Redis源码系列」关于源码阅读的学习与思考
There is a problem with MySQL installation (the service already exists)