当前位置:网站首页>Redis installation test
Redis installation test
2022-06-12 08:46:00 【Wu Yu】
Use the source code to install and compile :
Install the source code compilation support library :yum install gcc gcc-c++
Download package :wget https://download.redis.io/releases/redis-6.2.3.tar.gz
Unzip the package :tar xzf redis-6.2.3.tar.gz
Get into redis Catalog :cd redis-6.2.3
Compilation and installation :make
( This process takes a long time ,)
After completion : Get into redis Execute... In directory make test command :

Pictured : Initial configuration , Two errors in the figure will appear ,, The solution is as follows :
Need to install TCL:
TCL8.6 install
wget Download Tcl from SourceForge.net
tar xzvf tcl8.6.1-src.tar.gz -C /usr/local/
cd /usr/local/tcl8.6.1/unix/
./configure
make
make install
The installation is basically finished here :
Then start redis,

There are two possible warnings ;

Solution :
The solution to the first problem :

The solution to the second problem : modify /etc/sysctl.conf The content of the file is shown in the figure :

Then you need to restart the service , This time you need to specify a file to start : Pictured

The front-end start Redis after , The terminal will enter Redis Console , There's no way to go on Linux command , That is, the terminal window is ” Abandoned ”, Input only Redis My orders . Need to restart a terminal window .
In the new window : Enter the following command , You can write data to it .

Here we need to pay attention to : The same key value , The later entry will overwrite the previous content .
Front end initiated shutdown command :
closed :Ctrl+c
Normally shut down :./redis-cli shutdown
- Forced shutdown is only required in Redis The console can execute directly (redis Some data may be lost ).
- Normal closing requires opening another terminal window (redis No loss of data , Recommended ).
Start and stop of the backend ;
- To start the backend, you need to modify the configuration file : modify redis.conf file , take daemonize To change the value of yes After saving .

- Backend start command : src/redis-server redis.conf
-

Back end shutdown command ;
closed :kill -9 process id
Normally shut down :src/redis-cli shutdown
Redis client
1、redis It comes with its own client
Introduced earlier redis Installation directory src The structure of the directory , It has been marked redis The client of , It is redis-cli. This client has two common functions :
- Used to shut down normally redis service .
- Let the terminal enter redis Console ( Background operation redis In the scenario of ).
start-up :
src/redis-cli -h 127.0.0.1 -p 6379
- -h: Specify the access to redis Server's ip Address
- -p: Specify the access to redis Server's port port
- If used ip The address and port are the default , Then the above command can be written as follows :src/redis-cli
close : quit
Graphical interface client :
There is one redis GUI client software , be known as redis-destop-manager. Support Windows、Mac OS X、Linux, Please choose to download according to your computer system , Here we use windows For example , In brief, the use of this software , Easy to install , All the way to the next step , Open the application after installation .
1、 modify redis Under the folder redis.conf file , stay bind 127.0.0.1 Add before the line # Comment out this line , Enable remote connection ( By default, only local connections can be used ).

And then use kill command , Kill those opened before redis service , Then restart the service in the background , Here, you should pay attention to starting according to the configuration file : command :
stay redis Execute under directory src/redis-server redis.conf use redis.conf Reset of set parameters redis-server service .
4、 Command line execution src/redis-cli Get into redis Command line , perform config set requirepass 123456 Set password for graphical interface login connection
5、 stay RedisDesktopManager The client enters the user name 、 password 、 Server address 、 Port to server , Click test connection .

After success , You can see that redis Next 16 Databases , From here, you can view redis The operation test has been carried out .

边栏推荐
- [advanced pointer I] character array & array pointer & pointer array
- You have an error in your SQL syntax; use near ‘and title=‘xxx‘‘ at line 5
- 处理异常数据
- Priority issues
- 2022.6.11-----leetcode.926
- Error: clear the history in the search box in the website?
- Analysis of 43 cases of MATLAB neural network: Chapter 8 prediction of GRNN Network - Freight Volume Prediction Based on generalized regression neural network
- Error: ER_ NOT_ SUPPORTED_ AUTH_ MODE: Client does not support authentication protocol requested ... ...
- What is the beauty of MES equipment management for enterprises?
- The difference between deep copy and shallow copy
猜你喜欢

Database foundation -- normalization and relational schema

The Three Kingdoms kill the surrounding areas -------- explanation of the pig Kingdom kill problem
![[new planning]](/img/8e/0e15e0f3ee08002eaceea1fe8948ec.jpg)
[new planning]

【字符集七】汉字的宽字符码和多字节码分别是多少

报错:清除网站内搜索框中的历史记录?

Production scheduling status of manufacturing enterprises and solutions of APS system

Error: what if the folder cannot be deleted when it is opened in another program

(p15-p16) optimization of the right angle bracket of the template and the default template parameters of the function template

通俗理解时域采样与频域延拓

了结非对称密钥
随机推荐
Engineers learn music theory (I) try to understand music
MSTP的配置与原理
How to understand the production scheduling of APS system?
Get last month, current time and next month
Why should enterprises implement MES? What are the specific operating procedures?
[compilation principle] understand BNF
js实现页面加载后再刷新一次
Background position - exact units
根据有效期显示距离当前还剩多少天有效期
[GUI development] browsing function implementation model of image processing software
Composition of box model
JVM learning notes: three local method interfaces and execution engines
Error: clear the history in the search box in the website?
[dynamic memory management] malloc & calloc and realloc and written test questions and flexible array
Query in MySQL
Where does the driving force of MES system come from? What problems should be paid attention to in model selection?
【进阶指针一】字符数组&数组指针&指针数组
Encapsulate the amount input box component.
第七章-更灵活定位内存地址
【字符集九】gbk拷贝到Unicode会乱码?

