当前位置:网站首页>Redis error reporting and common configurations

Redis error reporting and common configurations

2022-06-22 22:23:00 Catfish MINT_ she

install redis

Download link : If the download is unsuccessful, you can download it on the official website by yourself https://download.redis.io/releases

wget https://download.redis.io/releases/redis-6.2.1.tar.gz?_ga=2.213148948.1866727870.1617073678-1341157963.1617073678
--2021-03-30 11:19:41--  https://download.redis.io/releases/redis-6.2.1.tar.gz?_ga=2.213148948.1866727870.1617073678-1341157963.1617073678

Check to see if startup succeeded

ps -aux | grep redis
netstat -nltp

Test whether you can connect to redis The server

redis  The architecture is  C/S  framework , In our execution  redis-server  When the server has been started , If you want to test whether you can connect to the server, you can use the following command to test :
redis-cli //  This is a  redis  The client connection commands provided to us 

To configure redis

Modify the port :

{
     Own actual installation path }/redis/redis.conf
port 6379 

Change Password :

{
     Own actual installation path }/redis/redis.conf
 Before the change :# requirepass foobared
 After modification :requirepass admin123   //  Change the password you want to set 

More settings IP You can visit :

 Method 1 : Can be directly annotated  bind
 Method 2 :bind 0.0.0.0
 Settings section  IP  Accessible :192.168.2.39 192.168.2.38
 After the above settings are completed, you need to set another step :
protected-mode no # take yes Modified into no

Report a mistake :The program ‘redis-server’ is currently not installed. To run ‘redis-server’ please ask your administrator to install the package ‘redis-server’

 After installation  redis  after , Enter the command  redis-server  Times wrong :The program 'redis-server' is currently not installed. To run 'redis-server' please ask your administrator to install the package 'redis-server'
 terms of settlement :
 Execute the following commands before starting :sudo make install
 Cause of error :redis-server  The installation did not succeed , The official website recommends that you execute the above command before starting sudo make install

Error reporting II :Could not connect to Redis at 127.0.0.1:0: Connection refused

 The default password is not supported after changing the password  redis-cli  Connect to the server , Need a command :
redis-cli -p  Set your own port 
 Such as :redis-cli -p 11489

Error reporting 3 :(error) NOAUTH Authentication required.

After setting the password and port , Input redis-cli -p 11489 after , Will let us enter our own user name for authentication , If the authentication is not performed, the above error will be reported :
Screenshot of error reporting :
 Insert picture description here

 terms of settlement :
127.0.0.1:10419> auth "xxx" // Specific server login 
OK

restart redis

redis-server redis.conf
redis-conf : As  redis  Server side configuration file , Relevant information can be configured here , Such as : password 、 Port, etc 
redis-server: Server start command 
原网站

版权声明
本文为[Catfish MINT_ she]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/173/202206222032461523.html