redis+RedisBloom的装置和应用
- 如果你是linux开发环境,最新版的redis能够很不便的应用,但如果是Windows零碎的话,那么高版本的装置资源就很可贵了,docker能够疾速的解决你的后顾之忧。
装置
第一步: Launch RedisBloom with Docker
docker run -p 6379:6379 --name redis-redisbloom redislabs/rebloom:latest
第二步: Use RedisBloom with
redis-cli
docker exec -it redis-redisbloom bash# redis-cli# 127.0.0.1:6379>
第三步: Start a new bloom filter by adding a new item
# 127.0.0.1:6379> BF.ADD newFilter foo(integer) 1
第四步: Checking if an item exists in the filter
# 127.0.0.1:6379> BF.EXISTS newFilter foo(integer) 1
第五步: 配置明码或其它相干设置 ......
127.0.0.1:6379> config set requirepass xxxxxOK127.0.0.1:6379> config set notify-keyspace-events xE(error) NOAUTH Authentication required.127.0.0.1:6379> auth xxxxxOK127.0.0.1:6379> config set notify-keyspace-events xEOK127.0.0.1:6379>
参考文献
- https://blog.csdn.net/qq\_29645505/article/details/87895303
- https://github.com/RedisBloom/RedisBloom#launch-redisbloom-with-docker
- https://oss.redislabs.com/redisbloom/Quick\_Start/
留神:
- 连贯docker中的redis的时候,因为docker相当在windows中划一块做linux的独立运行环境。
- 该环境有本人的地址:192.168.99.100,所以拜访的时候最简略的形式是去连贯该网址。
6379 端口在虚机中网关中关上就能够内部连贯拜访了。