1.下载redisbloom插件(redis官网下载即可)
https://github.com/RedisLabsModules/redisbloom/

wget https://github.com/RedisLabsModules/rebloom/archive/v2.2.5.tar.gz
tar -zxvf v2.2.5.tar.gz
mv RedisBloom-2.2.5/ redisbloom
cd redisbloom
make
vi redis.conf

配置文件加入如下:

#####################MODULES####################                                                                                            # Load modules at startup. If the server is not able to load modules
# it will abort. It is possible to use multiple loadmodule directives.
loadmodule /usr/local/redis/redisbloom/redisbloom.so

启动redis

/usr/local/redis/bin/redis-server /usr/local/redis/etc/redis.conf 

检测是否成功

127.0.0.1:6379> bf.add url www.baidu.com
 
(integer) 1
 
127.0.0.1:6379> bf.exists url www.baidu.com
 
(integer) 1
 
127.0.0.1:6379> bf.exists url www.qq.com
 
(integer) 0
Logo

欢迎加入DeepSeek 技术社区。在这里,你可以找到志同道合的朋友,共同探索AI技术的奥秘。

更多推荐