当前位置:网站首页>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
边栏推荐
- 96% of the collected traffic is prevented by bubble mart of cloud hosting
- 17. File i/o buffer
- Global and Chinese market of handheld melanoma scanners 2022-2028: Research Report on technology, participants, trends, market size and share
- [development team follows] API specification
- [UE4] parse JSON string
- 12. Gettimeofday() and time()
- 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"
- 2022 registration examination for safety production management personnel of fireworks and firecracker production units and examination skills for safety production management personnel of fireworks an
- Network byte order
- Key knowledge of C language
猜你喜欢

Teach you how to optimize SQL

PHP database connection succeeded, but data cannot be inserted

1day vulnerability pushback skills practice (3)

Cache general management class + cache httpcontext Current. Cache and httpruntime Differences between caches
![Measurement fitting based on Halcon learning [4] measure_ arc. Hdev routine](/img/3a/cf6285ae1c01bda42874eeca9fe5b1.jpg)
Measurement fitting based on Halcon learning [4] measure_ arc. Hdev routine

WordPress collection WordPress hang up collection plug-in

A brief talk on professional modeler: the prospect and professional development of 3D game modeling industry in China

Fudan released its first review paper on the construction and application of multimodal knowledge atlas, comprehensively describing the existing mmkg technology system and progress

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

96% of the collected traffic is prevented by bubble mart of cloud hosting
随机推荐
What is the difference between enterprise wechat applet and wechat applet
Handler source code analysis
Sword finger offer 20 String representing numeric value
Setting methods, usage methods and common usage scenarios of environment variables in postman
Osnabrueck University | overview of specific architectures in the field of reinforcement learning
AI 助力藝術設計抄襲檢索新突破!劉芳教授團隊論文被多媒體頂級會議ACM MM錄用
Global and Chinese market of box seals 2022-2028: Research Report on technology, participants, trends, market size and share
Contest3145 - the 37th game of 2021 freshman individual training match_ F: Smallest ball
2022 Guangxi provincial safety officer a certificate examination materials and Guangxi provincial safety officer a certificate simulation test questions
長文綜述:大腦中的熵、自由能、對稱性和動力學
1day vulnerability pushback skills practice (3)
Libcblas appears when installing opencv import CV2 so. 3:cannot open shared object file:NO such file or directory
Advanced learning of MySQL -- Application -- storage engine
Setting methods, usage methods and common usage scenarios of environment variables in postman
MySQL query
Talking about custom conditions and handling errors in MySQL Foundation
The difference between int (1) and int (10)
Zhihu million hot discussion: why can we only rely on job hopping for salary increase? Bosses would rather hire outsiders with a high salary than get a raise?
Backpropagation formula derivation [Li Hongyi deep learning version]
Zblog collection plug-in does not need authorization to stay away from the cracked version of zblog