安装websocket模块所需库
yum install libunistring libunistring-devel
提示:/usr/bin/ld: cannot find -lmysqlclient
解决办法:rpm -ivh MySQL-shared-5.6.14-1.linux_glibc2.5.x86_64.rpm
rpm -ivh MySQL-devel-5.6.14-1.linux_glibc2.5.x86_64.rpm
提示:chown: invalid user: `kamailio:kamailio'
解决办法:adduser -U kamailio
提示:/etc/init.d/kamailio: line 148: start-stop-daemon: command not found
下载:http://developer.axis.com/download/distribution/apps-sys-utils-start-stop-daemon-IR1_9_18-2.tar.gz
tar xvf apps-sys-utils-start-stop-daemon-IR1_9_18-2.tar.gz
cd apps/sys-utils/start-stop-daemon-IR1_9_18-2/
gcc start-stop-daemon.c -o start-stop-daemon
cp start-stop-daemon /usr/sbin
Install And Maintain Kamailio v4.0.x Version From GIT
Main author: Daniel-Constantin Mierla <miconda (at) gmail.com>
This is a step by step tutorial about how to install and maintain Kamailio SIP Server version 4.0.x using the sources downloaded from GIT repository - the choice for those willing to write code for Kamailio or to try the new features to be released in the future with the next major stable version.
This document focuses on Kamailio v4.0.x with MySQL support, using a Debian unstable system.
The first version in release series 4.0 is 4.0.0, 4.0.x refers to the most recent version released at some point in time that starts with 4.0.
Note that Kamailio provides APT repositories for several Debian/Ubuntu releases, you can use them to do the install from .deb packages, see:
Notes on Kamailio vs SER
Since version 4.0.0, Kamailio and SER integration was fully completed, there are no more duplicated modules and a single database schema. Default flavour is kamailio, setting this name to the application and database. SER flavour can be compiled using make command line options (practically, flavour system is now just about naming the application and related components).
1. Prerequisites
To be able to follow the guidelines from this document you need root access.
The following packages are required before proceeding to the next steps.
-
git client: apt-get install git-core - it is recommended to have a recent version, if your Linux distro has an old version, you can download newer one from: http://git-scm.com/
-
gcc compiler: apt-get install gcc
-
flex - apt-get install flex
-
bison - apt-get install bison
-
libmysqlclient-dev - apt-get install libmysqlclient-dev
-
make - apt-get install make
-
if you want to enable more modules, some of them require extra libraries:
-
libssl - apt-get install libssl-dev
-
libcurl - apt-get install libcurl4-openssl-dev
-
libxml2 - apt-get install libxml2-dev
-
libpcre3 - apt-get install libpcre3-dev
-
2. Getting sources from GIT
First of all, you have to create a directory on the file system where the sources will be stored.
mkdir -p /usr/local/src/kamailio-4.0 cd /usr/local/src/kamailio-4.0
Download the sources from GIT using the following commands.
git clone --depth 1 --no-single-branch git://git.sip-router.org/sip-router kamailio cd kamailio git checkout -b 4.0 origin/4.0
Note: if your git client version does not support –no-single-branch command line parameter, then just remove it.
3.Tuning Makefiles
The first step is to generate config files for build system.
make cfg
Next step is to enable the MySQL module. Edit modules.lst file:
nano -w modules.lst
Add db_mysql to the variable include_modules.