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 ...
随机推荐
- 2018牛客网暑期ACM多校训练营(第九场)A -Circulant Matrix(FWT)
分析 大佬说看样例就像和卷积有关. 把题目化简成a*x=b,这是个xor的FWT. FWT的讲解请看:https://www.cnblogs.com/cjyyb/p/9065615.html 那么要求 ...
- HDU 1039(字符串判断 **)
题意是检查一个字符串是否满足三个条件: 一.至少有一个元音字母.二.不能出现三个连续的元音或三个连续的辅音.三.除了 ee 和 oo 外不能出现两个连续相同字母. 若三个条件都能满足,该字符串满足条件 ...
- IO流--字符流与字节流--File类常用功能
IO流的常用方法: 1: 文件的读取和写入图解: 2:字节流: 读写文件的方法: 一般效率读取: 读取文件: FileInputStream(); 写数据: Fil ...
- vue项目中引用jquery
1.使用npm安装 npm i jquery --S //jquery要小写 2.在package.json文件dependencies里面加入jq 3.在build文件夹的webpack.base. ...
- ava.io.InputStream & java.io.FileInputStream
java.io.InputStream & java.io.FileInputStream java.io.InputStream,这个抽象类是表示字节输入流的超类,这个抽象类的共性的方法有: ...
- for each循环(增强for循环)
底层实现是使用了迭代器,简化了迭代器的书写 格式: for(集合/数组的数据类型 变量名: 数组名/集合名) { // body } char[] chars = {'c', 'd', 'd', 'e ...
- 修改xshell的默认字间距和行间距
可能是不小心修改了xshell的某个配置,导致打开的会话中显示字间距和行间距都非常大,严重影响工作.参照官方手册也不能修改正常,详见:http://www.xshellcn.com/wenti/xiu ...
- web-hacking
https://wizardforcel.gitbooks.io/web-hacking-101/content/1.html
- tensorflow faster rcnn 代码分析一 demo.py
os.environ["CUDA_VISIBLE_DEVICES"]=2 # 设置使用的GPU tfconfig=tf.ConfigProto(allow_soft_placeme ...
- Java SE之正则表达式二:匹配
package demo.regex; import java.util.regex.Pattern; /* 正则表达式:匹配 */ public class RegexMatchesDemo { / ...