windows use Redis

1. Download windows version of Redis

Download: https://github.com/microsoftarchive/redis/releases
the windows version Rdis install unzip to your hard drive after the download is complete package, for example: D: / Redis folder

2. Start the windows version of Redis

Open a DOS window, go to the Redis folder, execute the following command to start the Redis server:

redis-server.exe redis.windows.conf

3. Start redis-cli interactive environment

New open a DOS window, enter the Reids folder, enter the following command to start redis-cli client

redis-cli.exe

Redis startup error

1.# Warning: no config file specified, using the default config. In order to specify a config file use redis-server.exe /path/to/redis.conf
然后把命令改成:redis-server.exe  redis.windows.conf
2.连环错误:
端口6379的错误
把redis.windows.conf里面的#bind 127.0.0.1的"#"去掉即可以
3.Creating Server TCP listening socket 127.0.0.1:6379: bind: No error
在命令行中运行
redis-cli.exe
127.0.0.1:6379>shutdown
not connected>exit
然后重新运行redis-server.exe redis.windows.conf

windows deployment Redis

Redis can be installed into windows services, boot from the start

redis-server --service-install redis.windows.conf

After installing, Redis has not started, start the following command

redis-server --service-start

Stop command:

redis-server --service-stop

windows deployment errors encountered Redis

 1. #HandleServiceCommands: system error caught. error code=1073, message = CreateService failed: unknown error
解决办法:
卸载服务:
redis-server --service-uninstall
再安装服务:
redis-server --service-install redis.windows.conf

Guess you like

Origin www.cnblogs.com/action-go/p/11484732.html