redis-- install redis and problem-solving can not start on ubuntu 18.04

The first is to install directly using apt-get install on it

sudo apt-get update
sudo apt-get install redis-server

The above command, on my win10 subsystem of linux, direct installation is complete. In Ali cloud rent ubuntu 18.04, then reported the following error

 

 

It says at startup failed.

tail /var/log/redis/redis-server.log
6442:C 19 Jan 14:47:56.417 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
6442:C 19 Jan 14:47:56.417 # Redis version=4.0.9, bits=64, commit=00000000, modified=0, pid=6442, just started
6442:C 19 Jan 14:47:56.417 # Configuration loaded
6450:M 19 Jan 14:47:56.420 # Creating Server TCP listening socket ::1:6379: bind: Cannot assign requested address

Then check the information that, possible causes are: IPv6 is disabled on the host, and the Ubuntu redis-server software package (version 5: 4.0.9-1) comes with: Bind 127.0.0.1 :: 1.

Address modification bind redis configuration file; bind comments address or address modification to bind 0.0.0.0

sudo came /etc/redis/redis.conf  

Locate the following line, which is a comment

 

 You can then start up

sudo /etc/init.d/redis-server start

A prompt start successfully.

From the previous log file can be seen

 

 

References https://www.jianshu.com/p/93085829535c

Guess you like

Origin www.cnblogs.com/chinxi/p/12214228.html