Q、C盤空間不足
解決方式:多文件夾查看大小,逐步縮小方位,
最終定位位置:
緩存清理目錄:C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Redis
[圖片]
Q、查看redis版本和redis端口:
1、進入cmd-輸入redis-cli
2、以中文的方式進入頁面:redis-cli –raw
Q、查看redis端口是否有連接
C:\Users\luosan>netstat -nat | find “6379”
TCP 0.0.0.0:6379 0.0.0.0:0 LISTENING InHost
TCP 127.0.0.1:6379 127.0.0.1:52752 ESTABLISHED InHost
TCP 127.0.0.1:6379 127.0.0.1:52769 ESTABLISHED InHost
TCP 127.0.0.1:6379 127.0.0.1:54999 ESTABLISHED InHost
TCP 127.0.0.1:52752 127.0.0.1:6379 ESTABLISHED InHost
TCP 127.0.0.1:52769 127.0.0.1:6379 ESTABLISHED InHost
TCP 127.0.0.1:54999 127.0.0.1:6379 ESTABLISHED InHost
TCP [::]:6379 [::]:0 LISTENING InHost
Q、redis測試普通數據:
1 redis> set test “我們”
2 OK
3 redis> get test
4 “\xe6\x88\x91\xe4\xbb\xac”
如何在get時取到它的中文呢?只需要在redis-cli 后面加上 –raw
redis> get test
“我們”
Q、查詢redis的牌號是否存在:
C:\Users\luosan>redis-cli
127.0.0.1:6379> lrange memcache.designation 1 1
1) “dc5c7986daef50c1e02ab09b442ee34f|001~ABS||1~0”
127.0.0.1:6379> lrange memcache.designation 1 1
1) “dc5c7986daef50c1e02ab09b442ee34f|001~ABS||1~0”
127.0.0.1:6379> lrange memcache.designation2 1 1
(empty list or set)
127.0.0.1:6379>
Q、查詢redis所有數據:
keys * 取出當前所有的key
exists name 查看n是否有name這個key
Q、連接別人的redis:
redis修改端口請求別人的主機redis
當然別人的主機redis也是需要設置訪問權限才行
設置配置在init.properties
REDIS_HOST=192.168.4.206
REDIS_PORT=6379
Q、電子盤為例redis造數據
更多數據圖片信息進入(http://note.youdao.com/yws/public/redirect/share?id=a57c49cc8489956496c7cc41344ae64b&type=false)
設置新增的標的
hmset etrade_target_summaries:0412 4 4:LDPE:550J:::0:0.0:8590.0:0.0:0.0:0.0:0.0:8600:-;-
hmset etrade_target_summaries:0412 5 5:LLDPE:7042:::0:0.0:8590.0:0.0:0.0:0.0:0.0:8600:-;-
hmset etrade_target_summaries:0412 6 6:LDPE:7042:::0:0.0:8590.0:0.0:0.0:0.0:0.0:8600:-;-
查詢當前日期標的
hgetall etrade_target_summaries:0412
發布當前數據
publish etrade.msg.channel 3:1460409223000:289.1
hgetall etrade_target_summaries:0412
Q、redis例子一些demo博客
http://blog.csdn.net/songylwq/article/details/26008327
http://blog.163.com/asd_wll/blog/static/210310402013654528316/
Q、Redis無法啟動You may fix this problem by either reducing the size of the Redis heap with the –maxheap
解決方式一:不適用window安裝版,直接使用解壓縮版本
解決方式二:
查看方法:可以選擇窗口啟動,也可以選cmd中啟動redis-server
在cmd中啟動立即停止,並且提示錯誤,此時手動加大堆內存
解決方式:http://blog.csdn.net/testcs_dn/article/details/45220197
