当前位置:网站首页>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
边栏推荐
- What is cloud primordial?
- Love and self-discipline and strive to live a core life
- Safety tips - seat belt suddenly fails to pull? High speed police remind you how to use safety belts in a standardized way
- Li Chuang EDA learning notes IX: layers
- Keep an IT training diary 055- moral bitch
- 機器學習基礎:用 Lasso 做特征選擇
- 2022 Guangxi provincial safety officer a certificate examination materials and Guangxi provincial safety officer a certificate simulation test questions
- 7 * 24-hour business without interruption! Practice of applying multiple live landing in rookie villages
- 1day vulnerability pushback skills practice (3)
- Problems and solutions of several concurrent scenarios of redis
猜你喜欢

MySQL workbench use

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?

Buuctf QR code
![[Yugong series] February 2022 attack and defense world advanced question misc-83 (QR easy)](/img/36/e5b716f2f976eb474b673f85363dae.jpg)
[Yugong series] February 2022 attack and defense world advanced question misc-83 (QR easy)

VRRP+BFD

AI 助力藝術設計抄襲檢索新突破!劉芳教授團隊論文被多媒體頂級會議ACM MM錄用

Record a problem that soft deletion fails due to warehouse level error

Imperial cms7.5 imitation "D9 download station" software application download website source code

Save Private Ryan - map building + voltage dp+deque+ shortest circuit

Pagoda SSL can't be accessed? 443 port occupied? resolvent
随机推荐
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
POSTECH | option compatible reward reverse reinforcement learning
Network communication basic kit -- IPv4 socket structure
MySQL query
Talking about custom conditions and handling errors in MySQL Foundation
PID of sunflower classic
Tsinghua University product: penalty gradient norm improves generalization of deep learning model
Kiss number + close contact problem
Measurement fitting based on Halcon learning [4] measure_ arc. Hdev routine
Global and Chinese market of handheld melanoma scanners 2022-2028: Research Report on technology, participants, trends, market size and share
Global and Chinese market for travel wheelchairs 2022-2028: Research Report on technology, participants, trends, market size and share
Site favorites
Remote work guide
@Scheduled scheduled tasks
[Valentine's Day confession code] - Valentine's Day is approaching, and more than 10 romantic love effects are given to the one you love
Advanced learning of MySQL -- Application -- storage engine
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?
Package and download 10 sets of Apple CMS templates / download the source code of Apple CMS video and film website
SQL injection (1) -- determine whether there are SQL injection vulnerabilities
MySQL data query optimization -- data structure of index