opensips redis配置记录
说明:本配置目的:增加opensips对 Redis 的支持。
一、步骤:
1、Redis Server 安装。
2、Hiredis Client 安装。Hiredis 是 Redis 官方指定的C语音客户端开发包,支持Redis 完整的命令集、管线以及事件驱动编程。
3、Opensips Server 安装(我安装的是 1.11.1)。
二、详细说明:
1、Redis Server 安装 ,请参考http://redis.io/topics/quickstart。(我安装的是 redis-2.6.14)
2、Hiredis Client 安装:
解压 redis-2.6.14.tar.gz , 进入 redis-2.6.14 目录,找到 deps/ 目录。(如果没有该目录,请到redis官网下载)
cd deps/hiredis/
make
make install
3、Opensips Server 安装:
解压 并 进入 Opensips 的安装包 , (默认安装在 /usr 目录下)
如: cd /usr/local/src/opensips-1.11.1-tls
make
make include_modules="cachedb_redis" modules
make include_modules="cachedb_redis" install
检查是否有cachedb_redis.so : ls /usr/lib64/opensips/modules/ ,如果有 OK,没有需要重新编译。
opensipsctl start , 启动正常。
在 /usr/etc/opensips/opensips.cfg 中添加 loadmodule "cachedb_redis.so" , opensipsctl restart 正常启动就OK了。
如果无法正常启动,log 文件中提示:
opensips: ERROR:core:sr_load_module: could not open module </usr//lib64/opensips/modules/cachedb_redis.so>: libhiredis.so.0.13: cannot open shared object file: No such file or directory、
确认 libhiredis.so 文件是否在 /usr/lib 目录下,如果不是,cp 到 /usr/lib 目录下。 查看 ldconfig -v ,重新生成 ldconfig /usr/lib .
重新启动,如果还是无法启动,删除libhiredis.so.0.13 , 清除hiredis, 重新安装hiredis。 可以换成 libhiredis.so.0.11 版本。
四、配置文件说明:
loadmodule "cachedb_redis.so"
modparam("cachedb_redis", "cachedb_url","redis://root:auth_password@192.168.5.50:6379/0")
注: auth_password : 用来认证的密码
192.168.5.50 : redis 所在的服务器IP
6379 : redis 的端口号
0 : redis 的 DB 号
opensips redis配置记录的更多相关文章
- 习课的redis配置记录
<!-- redis begin --> <dependency> <groupId>redis.clients</groupId> <artif ...
- CentOS 6.6下Redis安装配置记录
转载于:http://www.itxuexiwang.com/a/shujukujishu/redis/2016/0216/120.html?1455855209 在先前的文章中介绍过redis,以下 ...
- redis 配置
一 Redis 支持写的指令 Redis大概的命令如下:set setnx setex appendincr decr rpush lpush rpushx lpushx linsert lset r ...
- redis配置详解
##redis配置详解 # Redis configuration file example. # # Note that in order to read the configuration fil ...
- Redis配置集群一(window)
因为接下来的项目要使用到redis作为我们项目的缓存,所以就花了一天时间研究了一下redis的一些用法,因为没转linux虚拟机,所以就决定先研究一下windows版本的redis集群.主要是redi ...
- redis配置详情
# Redis configuration file example # Note on units: when memory size is needed, it is possible to sp ...
- Asp.Net Core 2.0 项目实战(6)Redis配置、封装帮助类RedisHelper及使用实例
本文目录 1. 摘要 2. Redis配置 3. RedisHelper 4.使用实例 5. 总结 1. 摘要 由于內存存取速度远高于磁盘读取的特性,为了程序效率提高性能,通常会把常用的不常变动的数 ...
- Redis配置参数详解
Redis配置参数详解 /********************************* GENERAL *********************************/ // 是否作为守护进 ...
- Redis配置主从复制
Redis配置主从复制 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.操作环境介绍 1>.操作系统环境 [root@node101.yinzhengjie.org.cn ...
随机推荐
- HTML&CSS总结
HTML 如果把网页比作房子的话,那么HTML就是搭建房子的整体结构,CSS就是对房子进行装修,HTML主要涉及各种标签的使用,总结如下,需要补充的一点是行内标签与块级标签的区别 inline:在一行 ...
- Could not find default endpoint element that references contract 'wcfXXXXXXXXXXX' in the ServiceMode
Service本身没有问题,但是调用的时候,只在DataAccessSilverlight里引用了,而在主工程WebGISDemo里没有引用服务PowerDataServiceReference,所以 ...
- vertica系列:数据的导入导出
本文仅涉及 Vertica 导入导出本地文件, 以及两个 Vertica 集群相互导出, 不涉及 Vertica 和 hdfs/Hive 导入导出和互操作. copy 数据导入工具 copy 命令无疑 ...
- you have mixed tabs and spaces.Fix This屏蔽
这个功能很影响vs的速度,解决办法(VS2010版本为例),将Fix Mixed Tabs改为OFF即可.
- Newtonsoft.Json 的高级用法
Ø 简介 接着前一篇http://www.cnblogs.com/abeam/p/8295765.html,继续研究 Newtonsoft.Json 的一些高级用法.主要包括: 1. JSON ...
- git 重命名 origin
git remote rename origin old-origin git remote add origin https://gitlab.com/wuxianqiang/my-project. ...
- Python的参数类型
参数类型: 1.必填参数,位置参数(positional arguments,官方定义,就是其他语言所说的参数) 2.默认值参数,非必传 3.可变参数,非必传,不限制参数个数,比如说给多个人发邮件,发 ...
- Python Tornado简介
简介 Tornado 是 FriendFeed 使用的可扩展的非阻塞式 web 服务器及其相关工具的开源版本.这个 Web 框架看起来有些像web.py 或者 Google 的 webapp,不过为了 ...
- 全国人口 信息(NCIIC)接口开发纪要
阶段一:根据wsdl2java命令解析https://ws.nciic.org.cn/nciic_ws/services/NciicServices?wsdl以生成接口调用的对象类: wsdl2jav ...
- Hibernate Transformers之三种结果转换说明
在hibernate使用的过程中,我们通常需要对结果进行解释.Hibernate为我们提供了以下3种查询结果解释方法: Transformers.ALIAS_TO_ENTITY_MAP //把输出结果 ...