当前位置:网站首页>ubuntu20安裝redisjson記錄
ubuntu20安裝redisjson記錄
2022-07-07 03:25: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++代碼中時,輸入的數據格式也需要進行相應的調整。注意轉義字符的應用,如下圖:
边栏推荐
- About Estimation Statistics
- Matlab Error (Matrix dimensions must agree)
- 杰理之开启经典蓝牙 HID 手机的显示图标为键盘设置【篇】
- An error in SQL tuning advisor ora-00600: internal error code, arguments: [kesqsmakebindvalue:obj]
- SQL中删除数据
- input_ delay
- 存储过程与函数(MySQL)
- 上个厕所的功夫,就把定时任务的三种调度策略说得明明白白
- Sub pixel corner detection opencv cornersubpix
- cocos3——8. Implementation Guide for beginners
猜你喜欢

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

Household appliance industry under the "retail is king": what is the industry consensus?

input_delay

Uniapp adaptation problem

CVPR 2022 最佳论文候选 | PIP: 6个惯性传感器实现全身动捕和受力估计

Intelligent static presence detection scheme, 5.8G radar sensing technology, human presence inductive radar application

线性表的查找

树莓派设置静态ip

Under the tide of "going from virtual to real", Baidu AI Cloud is born from real

腾讯云原生数据库TDSQL-C入选信通院《云原生产品目录》
随机推荐
应用程序启动速度的优化
HDU 4337 King Arthur's Knights 它输出一个哈密顿电路
[untitled]
尚硅谷JVM-第一章 类加载子系统
如何自定义Latex停止运行的快捷键
unrecognized selector sent to instance 0x10b34e810
VHDL实现任意大小矩阵加法运算
leetcode
杰理之在非蓝牙模式下,手机连接蓝牙不要跳回蓝牙模式处理方法【篇】
Jerry's RTC clock development [chapter]
【基于 RT-Thread Studio的CPK-RA6M4 开发板环境搭建】
杰理之电话本获取【篇】
The first symposium on "quantum computing + application of financial technology" was successfully held in Beijing
线性表的查找
21.(arcgis api for js篇)arcgis api for js矩形采集(SketchViewModel)
Appx代码签名指南
Appx code signing Guide
[Dameng database] after backup and recovery, two SQL statements should be executed
New benchmark! Intelligent social governance
[C language] question set of IX