-
Open the terminal performs command to install
sudo apt-get -y install redis-server
-
At this time, direct access to redis-cli, the default host native loopback address, redis default port 6379
redis-cli
-
Now you can also indicate a host is localhost connections redis, redis default port 6379
redis-cli -h localhost
-
Check in redis redis-cli-related information
info
-
Exit redis-cli
exit
-
Next we modify configuration files redis
cd /etc/redis sudo vim redis.conf
-
Enter the password to open with vim redis.conf profile found in row 61
bind 127.0.0.1
, that is redis default to allow the unit is connected
-
The
bind 127.0.0.1
comment out or delete -
In the 480 lines can be found
# requirepass foobared
comment -
In the 481 line is written
requirepass 123456
, then redis password is 123456 -
:wq
Save and Exit -
sudo service redis restart
Restart redis, no news is good news -
Now using the results are shown below
deepin-linux_15.11 mounted redis_3.2.6
Guess you like
Origin blog.csdn.net/Brannua/article/details/105065900
Ranking