当前位置:网站首页>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
边栏推荐
- Essay: RGB image color separation (with code)
- 概率还不会的快看过来《统计学习方法》——第四章、朴素贝叶斯法
- Mirror protocol of synthetic asset track
- 微服务实战|熔断器Hystrix初体验
- AMQ 4043 solution for errors when using IBM MQ remote connection
- I've taken it. MySQL table 500W rows, but someone doesn't partition it?
- Jingdong senior engineer has developed for ten years and compiled "core technology of 100 million traffic website architecture"
- Webflux responsive programming
- Count the number of various characters in the string
- Use of libusb
猜你喜欢
Avoid breaking changes caused by modifying constructor input parameters
Troubleshooting and handling of an online problem caused by redis zadd
Ora-12514 problem solving method
Shengshihaotong and Guoao (Shenzhen) new energy Co., Ltd. build the charging pile industry chain
Watermelon book -- Chapter 5 neural network
Machine learning practice: is Mermaid a love movie or an action movie? KNN announces the answer
WSL installation, beautification, network agent and remote development
Oracle modify database character set
微服务实战|声明式服务调用OpenFeign实践
Matplotlib剑客行——没有工具用代码也能画图的造型师
随机推荐
"Interview high frequency question" is 1.5/5 difficult, and the classic "prefix and + dichotomy" application question
盘点典型错误之TypeError: X() got multiple values for argument ‘Y‘
Hengyuan cloud_ Can aiphacode replace programmers?
Avoid breaking changes caused by modifying constructor input parameters
Shengshihaotong and Guoao (Shenzhen) new energy Co., Ltd. build the charging pile industry chain
一篇详解带你再次重现《统计学习方法》——第二章、感知机模型
Leetcode sword finger offer brush questions - day 23
Jingdong senior engineer has developed for ten years and compiled "core technology of 100 million traffic website architecture"
【Go实战基础】gin 如何自定义和使用一个中间件
Matplotlib剑客行——初相识Matplotlib
Analysis and solution of a classical Joseph problem
2022/2/14 summary
概念到方法,绝了《统计学习方法》——第三章、k近邻法
Microservice practice | load balancing component and source code analysis
Machine learning practice: is Mermaid a love movie or an action movie? KNN announces the answer
Ora-12514 problem solving method
Cloudreve自建云盘实践,我说了没人能限制得了我的容量和速度
Gocv boundary fill
Introduction to the basic concept of queue and typical application examples
Knowledge points are very detailed (code is annotated) number structure (C language) -- Chapter 3, stack and queue