当前位置:网站首页>ubuntu20安装redisjson记录
ubuntu20安装redisjson记录
2022-07-06 20:20:00 【小俊俊的博客】
ubuntu20安装redisjson记录
一、下载文件
https://github.com/RedisJSON/RedisJSON/releases
找到1.0.4版本,下载rejson.so
二、复制文件到指定文件夹
sudo cp ./src/rejson.so /usr/lib/
./src/rejson.so为你下载rejson.so的文件夹。
三、修改配置文件
sudo gedit /etc/redis/redis.conf
在第40几行左右添加
loadmodule /usr/lib/rejson.so

重启redis
sudo systemctl restart redis
四、测试
开启redis
redis-cli
输入
json.set abc . '{"a":"1","b":"2","c":"3"}'
如果返回ok即可
五、补充
1.在redisjson中,json存储的格式问题转义字符
在redisjson输入命令json.get时,可以看到其存储的格式有点变化,这一点体现在C++代码中时,输入的数据格式也需要进行相应的调整。注意转义字符的应用,如下图:
边栏推荐
猜你喜欢

Laravel php artisan 自动生成Model+Migrate+Controller 命令大全

21.(arcgis api for js篇)arcgis api for js矩形采集(SketchViewModel)
![Jericho turns on the display icon of the classic Bluetooth hid mobile phone to set the keyboard [chapter]](/img/f4/8464bf9b66a1215265ac873f286688.png)
Jericho turns on the display icon of the classic Bluetooth hid mobile phone to set the keyboard [chapter]

Flink task exit process and failover mechanism

input_ delay

20.(arcgis api for js篇)arcgis api for js面采集(SketchViewModel)

How to replace the backbone of the model

Significance and measures of source code confidentiality

如何替换模型的骨干网络(backbone)

2022.6.28
随机推荐
23.(arcgis api for js篇)arcgis api for js椭圆采集(SketchViewModel)
Flink Task退出流程与Failover机制
Codeforces round 264 (Div. 2) C gargari and Bishop [violence]
2022.6.28
[colmap] 3D reconstruction with known camera pose
Not All Points Are Equal Learning Highly Efficient Point-based Detectors for 3D LiDAR Point
房费制——登录优化
密码学系列之:在线证书状态协议OCSP详解
尚硅谷JVM-第一章 类加载子系统
装饰设计企业网站管理系统源码(含手机版源码)
杰理之在非蓝牙模式下,手机连接蓝牙不要跳回蓝牙模式处理方法【篇】
pip只下载不安装
Appx代码签名指南
Lavel PHP artisan automatically generates a complete set of model+migrate+controller commands
【安全的办公和生产力应用程序】上海道宁为您提供ONLYOFFICE下载、试用、教程
Uniapp adaptation problem
sshd[12282]: fatal: matching cipher is not supported: [email protected] [preauth]
24.(arcgis api for js篇)arcgis api for js点修改点编辑(SketchViewModel)
Cocos2d-x Box2D物理引擎编译设置
Tencent cloud native database tdsql-c was selected into the cloud native product catalog of the Academy of communications and communications