Redis installation, startup, password

windows version redis Download: https://github.com/microsoftarchive/redis/releases/tag/win-3.2.100

linux version Download: https://redis.io/

The only describes the installation of windows at redis

First, enter at Redis-x64-3.2.100 installation directory cmd, enter the following command to start the redis server

redis-server.exe

After a successful start, you can see the page shown below

Then open another terminal, enter the following command, which is no password to enter redis,

redis-cli.exe

At this point you can see redis default blank password, redis default port is 6379

Set a password, the command

config set requirepass yourpassword

As shown below can be seen already successfully set a password to view the password, enter the command 

config get requirepass

 

 

However, redis this way will only be useful in the current without shutting down services, introduce another method, set by modifying the configuration file

Redis found in the root directory redis.windows.conf profiles, search requirepass, find passwords comment line, add the following code :

Requirepass foobared # 
requirepass Tenny      // Note that there is a space before the line

redis configuration file has two, I only modified a, redis.windows.conf and redis.windows-server.conf, just select one modification can be.

When log in to add redis.windows.conf behind the exe configuration file to take effect

redis-server.exe redis.windows.conf

input the command

redis-cli.exe -h 127.0.0.1 -p 6379 -a your's password

It has been configured as shown password

 

 

 

 Reference's blog: https://www.cnblogs.com/tenny-peng/p/11543440.html

 

Guess you like

Origin www.cnblogs.com/laitongxue/p/12302116.html