当前位置:Gxlcms > linux教程 > CentOS 6.0如何安装配置Kamailio

CentOS 6.0如何安装配置Kamailio

时间:2021-07-01 10:21:17 帮助过:7人阅读

  Kamailio是一款sip服务器,能够注册服务器、重定向服务器,那么CentOS 6.0系统要如何安装Kamailio呢?下面小编将针对Kamailio的安装配置给大家做个详细介绍。

 CentOS 6.0如何安装配置Kamailio

  1.编译安装

  下载源码

  # cd ~

  # wget http://www.kamailio.org/pub/kamailio/latest/src/kamailio-3.3.2_src.tar.gz

  # tar zxvf kamailio-3.3.2_src.tar.gz

  # cd kamailio-3.3.2

  # make FLAVOUR=kamailio cfg

  用自己熟悉的编辑工具打开“modules.lst”文件,找到“exclude_modules”变量,删除db_mysql字段(这里可以根据自己的需要调整编译的模块)。然后编译:

  # make all

  # make install

  缺省情况下,Kamailio的可执行文件安装在“/usr/local/sbin”路径下,配置文件安装在“/usr/local/etc/kamailio”路径下。

  几个可执行文件功能如下:

  kamailio - Kamailio服务器的执行文件

  kamdbctl - 创建和管理数据库的脚本

  kamctl - 管理和控制Kamailio服务器的脚本

  sercmd - CLI,一个命令行工具,访问提供Kamailio服务器的接口

  2.配置

  配置环境变量:

  Kamailio的环境变量存储在/usr/local/etc/kamailio/kamctlrc文件中,安装时,就已经安装好模板文件了,只需要编辑一些简单的配置项即可。

  # cat /usr/local/etc/kamailio/kamctlrc

  # $Id$

  #

  # The Kamailio configuration file for the control tools.

  #

  # Here you can set variables used in the kamctl and kamdbctl setup

  # scripts. Per default all variables here are commented out, the control tools

  # will use their internal default values.

  ## your SIP domain

  SIP_DOMAIN=kamailio.org

  ## chrooted directory

  # $CHROOT_DIR=“/path/to/chrooted/directory”

  ## database type: MYSQL, PGSQL, Oracle, DB_BERKELEY, or DBTEXT, by default none is loaded

  # If you want to setup a database with kamdbctl, you must at least specify

  # this parameter.

  DBENGINE=MYSQL

  ## database host

  DBHOST=localhost

  ## database name (for ORACLE this is TNS name)

  DBNAME=openser

  # database path used by dbtext or db_berkeley

  # DB_PATH=“/usr/local/etc/kamailio/dbtext”

  ## database read/write user

  DBRWUSER=openser

  ## password for database read/write user

  DBRWPW=“openserrw”

  ## database read only user

  # DBROUSER=openserro

  DBROUSER=openserro

  ## password for database read only user

  DBROPW=openserro

  ## database super user (for ORACLE this is ‘scheme-creator’ user)

  DBROOTUSER=“root”

  # user name column

人气教程排行