How to install RedisJSON on Debian

Intro

RedisJSON module allows you to store JSON objects in a Redis database without deserialization. The module is written in Rust and it's NOT installed by default and there's no binary so you have to compile it from source. You'll need Rust and cargo.

Install dependencies

apt-get install cmake clang libclang1 

Install Rust

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Compile

git clone https://github.com/RedisJSON/RedisJSON
cd RedisJSON
cargo build --release

Install Module

mkdir /opt/redis
mv ./target/release/librejson.so /opt/redis/
echo "loadmodule /opt/redis/librejson.so" >> /etc/redis/redis.conf
systemctl restart redis-server
Follow me on Twitter! It's free!