– Kamailio SIP Server –

Kamailio (OpenSER) - Howto make Debian packages (Kamailio <=1.5)

This Howto was tested with Openser 1.0.0 and radiusclient 0.5.1. Nevertheless it should work also with newer versions.

The build process for Debian packages generates all Openser packages (also mysql, postgres, radius …). Thus, the on PC used for compiling the Debian packages, all required libraries must be installed, even if you do not install all packages afterwards.

Thus, you need the client and development libraries for the database backends (mysql and postgres), openssl and the radiusclient-ng libraries. The database libraries are included in Debian and can be easily installed using apt-get.

For etch:

apt-get install dpatch fakeroot debhelper libtool dpkg-dev autoconf automake m4 bison flex gcc make subversion cvs

apt-get install xsltproc unixodbc-dev libxmlrpc-c3-dev libperl-dev libsnmp-dev libconfuse-dev libldap2-dev

apt-get install libmysqlclient15-dev libexpat1-dev libxml2-dev libpq-dev libdb4.4-dev libcurl3-gnutls-dev

Radiusclient-ng

The radiusclient-ng must be compiled manually, as it is not included in the Debian distribution. Here I used the version 0.5.6

1. checkout from berlios CVS (hit ENTER when asked for the password):

cd /usr/local/src
mkdir radiusclient-ng
cd radiusclient-ng
cvs -d:pserver:anonymous@cvs.radiusclient-ng.berlios.de:/cvsroot/radiusclient-ng login
cvs -z3 -d:pserver:anonymous@cvs.radiusclient-ng.berlios.de:/cvsroot/radiusclient-ng co -r RELENG_0_5_6 radiusclient-ng
mv radiusclient-ng radiusclient-ng-5.6
cd radiusclient-ng-5.6

Note: change the RELENG value to the release version you want to check out, and make the appropriate alterations to the following secitons

Note: cvs often makes problems when you are behind a firewall which blocks cvs (port 2401). To test if you can reach the CVS server try with telnet: “telnet cvs.radiusclient-ng.berlios.de 2401”

2. correct version labeling

We edit the debian/changelog file to have debian packages with the correct version number: change “radiusclient-ng (0.5.0) unstable; urgency=low” to “radiusclient-ng (0.5.6) unstable; urgency=low”

3. build the Debian packages

dpkg-buildpackage -rfakeroot -tc

4. install the packages

cd ..
su
dpkg -i libradius-ng-dev_0.5.6_i386.deb libradius-ng_0.5.6_i386.deb radiusclient-ng_0.5.6_i386.deb
exit

Note: I think, radiusclient-ng_0.5.6_i386.deb is not necessary, but it includes a default /etc/radiusclient-ng/server file.

Openser

1. checkout from sourceforge SVN:

please refer to the installation instruction from SVN for further advise on this topic.

2. optional: if you need Radius/Diameter accounting edit modules/acc/Makefile and uncomment the Radius configuration

3. optional: if you like to have TLS enabled openser, set the environment TLS=1 (this is only necessary for openser 1.0.x. since openser 1.1.x TLS is enabled by default):

export TLS=1

Note: If you are using openser-cvs there are separate packing directory for debian sarge and debian etch. By default it will use the build system for etch, which does not work. Thus, If you want to build openser-CVS packages on sarge rename the directories:

cd packaging
mv debian debian-etch
mv debian-sarge debian
cd ..

4. build the Debian packages

chmod +x packaging/debian/rules
make deb

5. Done. The packages are located in ..

Installation Stuff