当前位置:网站首页>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
边栏推荐
- Contest3145 - the 37th game of 2021 freshman individual training match_ J: Eat radish
- ZABBIX API pulls the values of all hosts of a monitoring item and saves them in Excel
- Summarize the past to motivate yourself to move on
- Stm32bug [stlink forced update prompt appears in keilmdk, but it cannot be updated]
- [development team follows] API specification
- Contest3145 - the 37th game of 2021 freshman individual training match_ G: Score
- 96% of the collected traffic is prevented by bubble mart of cloud hosting
- [Valentine's Day confession code] - Valentine's Day is approaching, and more than 10 romantic love effects are given to the one you love
- 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
- How to use websocket to realize simple chat function in C #
猜你喜欢

Teach you how to optimize SQL

Problems and solutions of several concurrent scenarios of redis

I stepped on a foundation pit today

Package and download 10 sets of Apple CMS templates / download the source code of Apple CMS video and film website

Network communication basic kit -- IPv4 socket structure

Jenkins continuous integration environment construction V (Jenkins common construction triggers)

This function has none of DETERMINISTIC, NO SQL..... (you *might* want to use the less safe log_bin_t

Node solves cross domain problems

false sharing

Contest3145 - the 37th game of 2021 freshman individual training match_ 1: Origami
随机推荐
[untitled]
Contest3145 - the 37th game of 2021 freshman individual training match_ 1: Origami
A brief talk on professional modeler: the prospect and professional development of 3D game modeling industry in China
[Yugong series] February 2022 attack and defense world advanced question misc-84 (MySQL)
Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?
The 37 year old programmer was laid off, and he didn't find a job for 120 days. He had no choice but to go to a small company. As a result, he was confused
Fudan released its first review paper on the construction and application of multimodal knowledge atlas, comprehensively describing the existing mmkg technology system and progress
Comment la transformation numérique du crédit d'information de la Chine passe - t - elle du ciel au bout des doigts?
WordPress collection WordPress hang up collection plug-in
This function has none of DETERMINISTIC, NO SQL..... (you *might* want to use the less safe log_bin_t
POSTECH | option compatible reward reverse reinforcement learning
Zblog collection plug-in does not need authorization to stay away from the cracked version of zblog
Data collection and summary
Network byte order
AI 助力藝術設計抄襲檢索新突破!劉芳教授團隊論文被多媒體頂級會議ACM MM錄用
Li Chuang EDA learning notes 13: electrical network for drawing schematic diagram
2022 examination summary of quality controller - Equipment direction - general basis (quality controller) and examination questions and analysis of quality controller - Equipment direction - general b
Global and Chinese markets for electroencephalogram (EEG) devices 2022-2028: Research Report on technology, participants, trends, market size and share
MySQL workbench use
[UE4] parse JSON string