首先照常添加环境变量,如:D:\Program Files (x86)\Redis-x64-3.0.504
,然后进入 D:\Program Files (x86)\Redis-x64-3.0.504
目录执行以下命令即可:
D:\Program Files (x86)\Redis-x64-3.0.504>redis-server.exe ./redis.windows.conf
D:\Program Files (x86)\Redis-x64-3.0.504>redis-cli --help
redis-cli 3.0.504
Usage: redis-cli [OPTIONS] [cmd [arg [arg ...]]]
-h <hostname> Server hostname (default: 127.0.0.1).
-p <port> Server port (default: 6379).
-s <socket> Server socket (overrides hostname and port).
-a <password> Password to use when connecting to the server.
-r <repeat> Execute specified command N times.
-i <interval> When -r is used, waits <interval> seconds per command.
It is possible to specify sub-second times like -i 0.1.