Redis是非關係型資料庫,即Not-Only SQL。通常應用於快取、Session共用和歷史資料處理等。Redis基於C語言研發,通過鍵值對儲存,可以承載巨量資料的高負載查詢。
序號 | Type | 型別 |
---|---|---|
1 | String | 字串 |
2 | Hash | 雜湊型別 |
3 | List | 列表型別 |
4 | Set | 集合型別 |
5 | Zset | 有序集合型別 |
.\redis-server.exe .\redis.windows.conf
[27344] 23 Oct 12:16:44.973 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
[27344] 23 Oct 12:16:44.974 # Redis version=5.0.9, bits=64, commit=9414ab9b, modified=0, pid=27344, just started
[27344] 23 Oct 12:16:44.974 # Configuration loaded
.\redis-cli.exe shutdown
[20364] 23 Oct 12:45:18.515 # Redis is now ready to exit, bye bye...
.\redis-cli.exe -h 127.0.0.1 -p 6379
127.0.0.1:6379> set mykey myvalue
127.0.0.1:6379> get mykey
"myvalue"
以下把Redis製作成Windows的服務,方便使用
redis-server --service-install redis.windows.conf --loglevel verbose
[31104] 23 Oct 18:03:32.939 # Granting read/write access to 'NT AUTHORITY\NetworkService' on: "D:\Redis-x64-5.0.9"
[31104] 23 Oct 18:03:32.941 # Redis successfully installed as a service.
Windows服務Services.msc中生成Redis服務
D:\Redis-x64-5.0.9\redis-server.exe" --service-run redis.windows.conf --loglevel verbose
redis-server --service-start
[32424] 23 Oct 18:12:50.754 # Redis service successfully started.
redis-server --service-stop
[33536] 23 Oct 18:15:29.446 # Redis service successfully stopped.
.\redis-server.exe --service-uninstall
[27124] 23 Oct 18:01:02.657 # Redis service successfully uninstalled.