当前位置:网站首页>Redis notes (I) Linux installation process of redis
Redis notes (I) Linux installation process of redis
2022-07-04 03:05:00 【- ich lebe .】
First, download
Upload the installation package to linux Inside the virtual machine
Installation steps
1. Installation dependency C Language dependence
redis Use C Language writing , So you need to install C Language library
Execute the following order
# yum install -y gcc-c++ automake autoconf libtool make tcl
The following is the successful installation , Query after gcc Version of
2 2. Upload and unzip
hold redis-5.0.5.tar.gz Upload to /usr/local/tmp in
Unzip the file
# cd /usr/local/tmp
# tar zxf redis-5.0.5.tar.gz
3. Compile and install
Enter the unzip folder
# cd /usr/local/tmp/redis-5.0.5/
compile
# make
This make The meaning of the order is , take redis become c Language file , This command is just compiled ,
Not yet installed
install ,PREFIX Indicates where to install the software
# make install PREFIX=/usr/local/redis
The above is already redis The installation to local In the catalog redis Inside the directory , This redis There is a bin Catalog , There are some documents in it , So what is each file for
start-up
The front desk starts
Enter the command directly
./redis-server
After the above startup , This window cannot be operated , Close this window , This redis The software will shut down .
Background start redis
We unzipped before redis after , There is a redis.conf file , We can make a copy of him , Or not copy , Change it directly in this file , But for later master-slave replication , Cluster etc. , Or make a copy first , Then copy to which folder ? This is casual
Start the daemon when the background starts
4. Start Daemons
Copy cd /usr/local/tmp/redis-5.0.5/ in redis.conf The configuration file
# cp redis.conf /usr/local/redis/bin/
The above configuration file is copied successfully , Let's go to the corresponding directory , See if it has been copied
As can be seen above , It has been copied successfully
In this configuration file , Background startup is not supported by default , So we need to change this configuration file , Change it to yes
Modify the configuration file
# cd /usr/local/redis/bin/
# vim redis.conf
hold daemonize The value of is determined by no It is amended as follows yes, This is to ensure the background operation , If no, Then it turns off as soon as it starts , This is not good
After modifying the configuration above , Preservation . We can turn it on redis 了
6. Start and test
start-up redis, Never forget the configuration file ,
By default, the configuration file is not automatically loaded . This is this. redis Started with this configuration file ,
We can write many configuration files , When to use ,
Just use which configuration file to start . In other words, the configuration file can be copied in many copies
# ./redis-server redis.conf
restart redis
# ./redis-cli shutdown
# ./redis-server redis.conf
Start the client tools
#./redis-cli
stay redis5 The client tool in provides functions for commands .
The above will start in the background , Closed the window , You can also connect in the code
边栏推荐
- Talking about custom conditions and handling errors in MySQL Foundation
- No clue about the data analysis report? After reading this introduction of smartbi, you will understand!
- 2022 attached lifting scaffold worker (special type of construction work) free test questions and attached lifting scaffold worker (special type of construction work) examination papers 2022 attached
- I stepped on a foundation pit today
- [Valentine's Day confession code] - Valentine's Day is approaching, and more than 10 romantic love effects are given to the one you love
- Create real-time video chat in unity3d
- The "two-way link" of pushing messages helps app quickly realize two-way communication capability
- Design and implementation of redis 7.0 multi part AOF
- Career development direction
- Lichuang EDA learning notes 14: PCB board canvas settings
猜你喜欢
No clue about the data analysis report? After reading this introduction of smartbi, you will understand!
Résumé: entropie, énergie libre, symétrie et dynamique dans le cerveau
1day vulnerability pushback skills practice (3)
C # learning notes: structure of CS documents
Unity controls the selection of the previous and next characters
150 ppt! The most complete "fair perception machine learning and data mining" tutorial, Dr. AIST Toshihiro kamishima, Japan
Backpropagation formula derivation [Li Hongyi deep learning version]
96% of the collected traffic is prevented by bubble mart of cloud hosting
Talking about custom conditions and handling errors in MySQL Foundation
[software implementation series] software implementation interview questions with SQL joint query diagram
随机推荐
The "two-way link" of pushing messages helps app quickly realize two-way communication capability
Contest3145 - the 37th game of 2021 freshman individual training match_ D: Ranking
Redis transaction
The first spring of the new year | a full set of property management application templates are presented, and Bi construction is "out of the box"
POSTECH | option compatible reward reverse reinforcement learning
2022 examination summary of quality controller - Equipment direction - general basis (quality controller) and examination questions and analysis of quality controller - Equipment direction - general b
[latex] production of complex tables: excel2latex and detail adjustment
@Scheduled scheduled tasks
Key knowledge of embedded driver
C # learning notes: structure of CS documents
Hospital network planning and design document based on GLBP protocol + application form + task statement + opening report + interim examination + literature review + PPT + weekly progress + network to
MySQL workbench use
查詢效率提昇10倍!3種優化方案,幫你解决MySQL深分頁問題
長文綜述:大腦中的熵、自由能、對稱性和動力學
Rhcsa day 2
中電資訊-信貸業務數字化轉型如何從星空到指尖?
7 * 24-hour business without interruption! Practice of applying multiple live landing in rookie villages
60 year old people buy medical insurance and recommend a better product
Record a problem that soft deletion fails due to warehouse level error
Design and implementation of redis 7.0 multi part AOF