Q、C盘空间不足
解决方式:多文件夹查看大小,逐步缩小方位,
最终定位位置:
缓存清理目录:C:WindowsServiceProfilesNetworkServiceAppDataLocalRedis
[图片]
Q、查看redis版本和redis端口:
1、进入cmd-输入redis-cli
2、以中文的方式进入页面:redis-cli –raw
Q、查看redis端口是否有连接
C:Usersluosan>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 “xe6x88x91xe4xbbxac”
如何在get时取到它的中文呢?只需要在redis-cli 后面加上 –raw
redis> get test
“我们”
Q、查询redis的牌号是否存在:
C:Usersluosan>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