当前位置:网站首页>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
边栏推荐
- PID of sunflower classic
- PTA tiantisai l1-079 tiantisai's kindness (20 points) detailed explanation
- Rhcsa day 3
- Pagoda SSL can't be accessed? 443 port occupied? resolvent
- [Wu Enda deep learning] beginner learning record 3 (regularization / error reduction)
- Summarize the past to motivate yourself to move on
- There is no need to authorize the automatic dream weaving collection plug-in for dream weaving collection
- VRRP+BFD
- The difference between int (1) and int (10)
- 60 year old people buy medical insurance and recommend a better product
猜你喜欢
Node write API
Record a problem that soft deletion fails due to warehouse level error
PID of sunflower classic
Stm32bug [stlink forced update prompt appears in keilmdk, but it cannot be updated]
Tsinghua University product: penalty gradient norm improves generalization of deep learning model
17. File i/o buffer
Rhcsa day 3
Résumé: entropie, énergie libre, symétrie et dynamique dans le cerveau
Save Private Ryan - map building + voltage dp+deque+ shortest circuit
The "message withdrawal" of a push message push, one click traceless message withdrawal makes the operation no longer difficult
随机推荐
@Scheduled scheduled tasks
Experience summary of the 12th Blue Bridge Cup (written for the first time)
Save Private Ryan - map building + voltage dp+deque+ shortest circuit
Dare to climb here, you're not far from prison, reptile reverse actual combat case
Zblog collection plug-in does not need authorization to stay away from the cracked version of zblog
96% of the collected traffic is prevented by bubble mart of cloud hosting
Keep an IT training diary 054- opening and closing
JS object definition
Comment la transformation numérique du crédit d'information de la Chine passe - t - elle du ciel au bout des doigts?
[UE4] parse JSON string
14. Process time
Global and Chinese market of thin film deposition systems 2022-2028: Research Report on technology, participants, trends, market size and share
13. Time conversion function
How to use websocket to realize simple chat function in C #
I stepped on a foundation pit today
[Yugong series] February 2022 attack and defense world advanced question misc-83 (QR easy)
PTA tiantisai l1-079 tiantisai's kindness (20 points) detailed explanation
Global and Chinese market of handheld melanoma scanners 2022-2028: Research Report on technology, participants, trends, market size and share
[untitled]
POSTECH | option compatible reward reverse reinforcement learning