当前位置:网站首页>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++代码中时,输入的数据格式也需要进行相应的调整。注意转义字符的应用,如下图:
边栏推荐
- 【达梦数据库】备份恢复后要执行两个sql语句
- 【达梦数据库】添加自动收集统计信息的任务
- Oracle connection pool is not used for a long time, and the connection fails
- cocos3——8.实现初学者指南
- HMS core machine learning service creates a new "sound" state of simultaneous interpreting translation, and AI makes international exchanges smoother
- 变量、流程控制与游标(MySQL)
- Lavel PHP artisan automatically generates a complete set of model+migrate+controller commands
- Opencv environment, and open a local PC camera.
- 19.(arcgis api for js篇)arcgis api for js线采集(SketchViewModel)
- Jerry's ble exiting Bluetooth mode card machine [chapter]
猜你喜欢

Flutter3.0了,小程序不止于移动应用跨端运行

变量、流程控制与游标(MySQL)

The latest 2022 review of "small sample deep learning image recognition"

函数重入、函数重载、函数重写自己理解

OC, OD, push-pull explanation of hardware

装饰设计企业网站管理系统源码(含手机版源码)

Le tube MOS réalise le circuit de commutation automatique de l'alimentation principale et de l'alimentation auxiliaire, et la chute de tension "zéro", courant statique 20ua

Another million qubits! Israel optical quantum start-up company completed $15million financing

VHDL实现任意大小矩阵加法运算

腾讯云原生数据库TDSQL-C入选信通院《云原生产品目录》
随机推荐
校招行测笔试-数量关系
又一百万量子比特!以色列光量子初创公司完成1500万美元融资
Codeforces round 264 (Div. 2) C gargari and Bishop [violence]
Development of wireless communication technology, cv5200 long-distance WiFi module, UAV WiFi image transmission application
LAB1配置脚本
Matlab Error (Matrix dimensions must agree)
Cocos2d-x box2d physical engine compilation settings
Centerx: open centernet in the way of socialism with Chinese characteristics
What about SSL certificate errors? Solutions to common SSL certificate errors in browsers
【达梦数据库】备份恢复后要执行两个sql语句
应用程序启动速度的优化
从 1.5 开始搭建一个微服务框架——日志追踪 traceId
24.(arcgis api for js篇)arcgis api for js点修改点编辑(SketchViewModel)
The solution of unable to create servlet file after idea restart
Stored procedures and functions (MySQL)
Shell programming basics
How does C language (string) delete a specified character in a string?
[swift] learning notes (I) -- familiar with basic data types, coding styles, tuples, propositions
2022.6.28
23.(arcgis api for js篇)arcgis api for js椭圆采集(SketchViewModel)