1. Install redis
64 – bit [download] address: https://github.com/183497849/redis-windows
I am using the redis-184.108.40.2063 version, you can choose other suitable versions, use github to download and decompress them, and the decompression looks like this:
2 Configure redis
Modify the redis.windows.conf file, set the maxmemory size, find the maxmemory
Set the redis password (or not), find the requirepass foobared, write the following configuration below, and set the password yourself.
3. Test run
Open a cmd window, enter the directory where you installed redis, mine is: G:\ruanjian\redis, and then run it, the following picture appears and it is successful.
At this time, reopen a cmd window. If the original window is closed, the redis service is also closed. Then go to the root directory of redis and run
redis-cli.exe -h 127.0.0.1 -p 6379
Some people may report noauth authentication required error, that is because you have set a password in the redis configuration, enter auth “your password”, and then run your test. The following figure shows that the test is successful.
4. Install the boot service
If you don’t turn this on you have to run it every time
to start the redis service. First open a cmd window, enter your redis root directory, run
redis-server --service-install redis.windows.conf
The picture below is successful
Then open a new cmd window and run services.msc to automatically start the redis service.