Redis Docker 安装 与 普通安装
docker 安装
docker run -d -p 6379:6379 –name redis -v /usr/local/docker/redis/redis.conf:/etc/redis/redis.conf -v /usr/local/docker/redis/data:/data redis –requirepass 123456
普通安装
cd /usr/local/ wget http://download.redis.io/releases/redis-5.0.7.tar.gz tar -zxvf redis-5.0.7.tar.gz cd redis-5.0.7/ make make install
修改 redis.conf
1
2
3
4
5
6
# 需要远程访问,注释掉绑定地址
# bind 127.0.0.1
# 以守护进程的方式运行
daemonize yes
# 设置连接密码
requirepass 123456
redis-server redis.conf
布隆过滤器
git clone https://github.com/RedisBloom/RedisBloom.git cd RedisBloom/ git checkout 2.2 make cd ../ redis-server redis.conf –loadmodule ./RedisBloom/redisbloom.so
限流
mkdir redis-cell cd redis-cell/ wget https://github.com/brandur/redis-cell/releases/download/v0.2.4/redis-cell-v0.2.4-x86_64-unknown-linux-gnu.tar.gz tar -zxvf redis-cell-v0.2.4-x86_64-unknown-linux-gnu.tar.gz cd ../ redis-server redis.conf –loadmodule ./redis-cell/libredis_cell.so