Windows system - Download, install, configure and set Redis to start automatically after booting

Windows system - Download, install, configure and set Redis to start automatically after booting

1. Download and install Redis

  • download link
    insert image description here
  • Unzip the downloaded zip file:
    insert image description here
  • Redis configuration files: redis.windows.conf, redis.windows-service.conf (Redis service: Redis service can be started)
    insert image description here
  • Use the Redis command line tool redis-cli to start Redis:
    insert image description here

2. Configure environment variables

  • This computer - right click - Properties - Change Settings/Advanced System Settings - Advanced - Environment Variables - System Variables - Path Variables - Edit - Create a new Redis environment - the value is the decompression path of Redis - OK:
    insert image description here

3. Verify Redis and link Redis

  • Open cmd: enter redis-cli -v, if the Redis version appears, it means that the environment variable has been configured successfully
    insert image description here
  • Start the Redis service: redis-server.exe E:\s\redis\Redis-x64-5.0.14.1\redis.windows.conf (use the full path to start the Redis service/others can be started using redis-server)
    insert image description here
  • Connect to Redis: reopen a cmd window, do not close the already started Redis service window, use redis-cli to connect to the Redis service
    insert image description here
  • Set the Redis service password: Set the Redis password in the redis.windows.conf file. After modifying the configuration file, you need to restart the Redis service and connect to Redis, otherwise the set password may not work
    insert image description here

4. Redis is set to start automatically in Windows system

  • The above configuration of the Redis service has been set up, and it is found to open this computer-management-computer management-services and applications-services (there is no Redis service in the service)
    insert image description here
  • Set up the Redis service in the Windows system: Open cmd in the Redis installation directory - enter redis-server.exe --service-install redis.windows.conf --loglevel verbose
    insert image description here
  • Refresh or reopen this computer at this time - Management - Computer Management - Services and Applications - Services (the Redis service appears in the service)
    insert image description here
  • Start the Redis service: Error 1067 is reported when starting (the status of the Redis service is not running)
    insert image description here
  • The reason for 1067 is that the Redis service was opened by using cmd and the connection Redis window was not closed. The solution: close all the cmd windows about Redis (at this time, the Redis service has been opened, the status is running, and it is automatically started after booting)
    insert image description here

V. Summary

  • Different errors may occur during the installation process, and you need to deal with different errors according to your own situation

Guess you like

Origin blog.csdn.net/m0_50298323/article/details/128718380