下載redis
地址:https://github.com/microsoftarchive/redis/releases
安裝和配置
- 解壓縮下載好的安裝包:
- 運行redis服務器
在redis壓縮目錄,打開cmd,執行命令行:
redis-server.exe redis.windows.conf
- 運行redis客戶端
redis服務端不要關閉,在redis壓縮目錄,打開cmd,執行命令行:
redis-cli.exe -h 127.0.0.1 -p 6379
- 測試
- set name hugo0129
- get name
設置key=name,value=hugo0129
設置redis密碼
- 獲取當前密碼:config get requirepass
- 設置密碼:config set requirepass “123456”
- 再次獲取:get name,提示沒有權限,說明redis客戶端在設置密碼之後需要利用密碼再登錄連接:redis-cli.exe -h 127.0.0.1 -p 6379 -a 123456
配置文件方式
http://download.redis.io/redis-stable/redis.conf
下載redis.conf配置文件到安裝目錄。上述設置密碼,可以通過conf文件修改:
windows可視化工具
https://redisdesktop.com/
之前是免費的,現在是付費的了。可以使用14天試用版。
免費可視化軟件
- https://github.com/qishibo/AnotherRedisDesktopManager/releases