PS:Redis is a high-performance in-memory NoSQL database, which is commonly used in server-side development software.

Install Redis on Windows

Microsoft Redis Repository: github.com/microsoftar…

PS: Microsoft no longer maintains Redis

Tporadowski Warehouse: github.com/tporadowski…

PS: Version maintained by Tporadowski

Modify the Redis configuration

Edit the redis.windows.conf file. Change the maximum storage and password:

Change the password: # requirePass foobared = > requirepass 123456Copy the code

Temporary startup service

Open a CMD window and use the CD command to switch to the Redis directory

Exe redis.windows.confCopy the code

The Redis service will use port 6379 by default

Redis service

Redis-server --service-install redis.windows-service.conf --loglevel verbose --service-uninstallCopy the code

Common Service Commands

Redis-server --service-start redis-server --service-stopCopy the code

Connect to the Redis service and test

Exe -h 127.0.0.1 -p 6379 -a 123456; redis-cli.exe -h 127.0.0.1 -p 6379 -a 123456;Copy the code
  • -h is host, and 127.0.0.1 is the local IP address
  • -p is the port, and 6379 is the default port on the Redis server
  • -a is auth, and 123456 is the redis password set in redis.windows.conf