关于docker:DockerRedisBloom的使用

5次阅读

共计 1012 个字符,预计需要花费 3 分钟才能阅读完成。

redis+RedisBloom 的装置和应用

  • 如果你是 linux 开发环境,最新版的 redis 能够很不便的应用,但如果是 Windows 零碎的话,那么高版本的装置资源就很可贵了,docker 能够疾速的解决你的后顾之忧。

装置

  • 第一步: Launch RedisBloom with Docker

    docker run -p 6379:6379 --name redis-redisbloom redislabs/rebloom:latest
  • 第二步: Use RedisBloom withredis-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 xxxxx
    OK
    127.0.0.1:6379> config set notify-keyspace-events xE
    (error) NOAUTH Authentication required.
    127.0.0.1:6379> auth xxxxx
    OK
    127.0.0.1:6379> config set notify-keyspace-events xE
    OK
    127.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 端口在虚机中网关中关上就能够内部连贯拜访了。

正文完
 0