当前位置:网站首页>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
边栏推荐
- Select sort and insert sort
- 以字节跳动内部 Data Catalog 架构升级为例聊业务系统的性能优化
- Redis sorted set data type API and application scenario analysis
- Jingdong senior engineer has developed for ten years and compiled "core technology of 100 million traffic website architecture"
- Troubleshooting and handling of an online problem caused by redis zadd
- Webflux responsive programming
- Flink - use the streaming batch API to count the number of words
- 微服务实战|手把手教你开发负载均衡组件
- 小米电视不能访问电脑共享文件的解决方案
- Function ‘ngram‘ is not defined
猜你喜欢

深入剖析JVM是如何执行Hello World的

洞见云原生|微服务及微服务架构浅析

The channel cannot be viewed when the queue manager is running
![[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)](/img/7f/2cd789339237b7a881bfed7b7545a9.jpg)
[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)

一篇详解带你再次重现《统计学习方法》——第二章、感知机模型

Don't spend money, spend an hour to build your own blog website

【Go实战基础】gin 如何绑定与使用 url 参数

微服务实战|负载均衡组件及源码分析

十年开发经验的程序员告诉你,你还缺少哪些核心竞争力?
![[go practical basis] how can gin get the request parameters of get and post](/img/fd/66074d157d93bcf20a5d3b37da9b3e.png)
[go practical basis] how can gin get the request parameters of get and post
随机推荐
Mysql安装时mysqld.exe报`应用程序无法正常启动(0xc000007b)`
Knife4j 2.X版本文件上传无选择文件控件问题解决
"Redis source code series" learning and thinking about source code reading
西瓜书--第六章.支持向量机(SVM)
Long summary (code with comments) number structure (C language) -- Chapter 4, string (Part 1)
「面试高频题」难度大 1.5/5,经典「前缀和 + 二分」运用题
C language implementation of mine sweeping game
QT qtimer class
[staff] time sign and note duration (full note | half note | quarter note | eighth note | sixteenth note | thirty second note)
长篇总结(代码有注释)数构(C语言)——第四章、串(上)
Pdf document of distributed service architecture: principle + Design + practice, (collect and see again)
Ora-12514 problem solving method
AMQ 4043 solution for errors when using IBM MQ remote connection
Flink - use the streaming batch API to count the number of words
2022/2/13 summary
Servlet全解:继承关系、生命周期、容器和请求转发与重定向等
Select sort and insert sort
Don't spend money, spend an hour to build your own blog website
How to realize asynchronous programming in a synchronous way?
Number structure (C language -- code with comments) -- Chapter 2, linear table (updated version)