Redis是非關系型資料庫,即Not-Only SQL,通常應用于快取、Session共享和歷史資料處理等,Redis基于C語言研發,通過鍵值對存盤,可以承載大資料的高負載查詢,
- 資料庫高并發讀寫,即High Performance RW
- 海量資料的高效率查詢和存盤,即Huge Storage
- 高可用性、擴展性和易于集成,即High avaliability、scalability、Integration
Redis的資料型別
| 序號 | Type | 型別 |
|---|---|---|
| 1 | String | 字串 |
| 2 | Hash | 散列型別 |
| 3 | List | 串列型別 |
| 4 | Set | 集合型別 |
| 5 | Zset | 有序集合型別 |
Redis啟動
.\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停止
.\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的服務,方便使用
設定Windows的Redis服務
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
啟動windows的Redis服務
redis-server --service-start
[32424] 23 Oct 18:12:50.754 # Redis service successfully started.
停止windows的Redis服務
redis-server --service-stop
[33536] 23 Oct 18:15:29.446 # Redis service successfully stopped.
卸載windows的Redis服務
.\redis-server.exe --service-uninstall
[27124] 23 Oct 18:01:02.657 # Redis service successfully uninstalled.
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/189778.html
標籤:其他
上一篇:MySQL常見問題總結
