kamailio:install:3.1.x-rpms-centos5x

Build Kamailio 3.1.x RPMs for CentOS 5.x

Install GIT

GIT is required to download the latest version of Kamailio 3.1.x directly from source repository.

Next instructions are taken from CentOS wiki:

Download the rpmforge-release package. Choose one of the two links below, selecting to match your host's architecture. If you are unsure of which one to use you can check your architecture with the command uname -i

The preferred rpmforge-release package to retrieve and to install in order to enable that repository is one of the two listed above.

Install DAG's GPG key

rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt

Verify the package you have downloaded

rpm -K rpmforge-release-0.5.2-2.el5.rf.*.rpm
Security warning: The rpmforge-release package imports GPG keys into your RPM database. As long as you have verified the md5sum of the key injection package, and trust Dag, et al., then it should be as safe as your trust of them extends

.

Install the package

rpm -i rpmforge-release-0.5.2-2.el5.rf.*.rpm

This will add a yum repository config file and import the appropriate GPG keys.

Then try to install git with:

yum install git

Install RPM Build Environment

Read the tutorial at CentOS wiki for more details:

Next is only the list of the commands to execute in order to setup the RPM build environment:

yum install rpm-build
yum install redhat-rpm-config
cd
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros

Download Kamailio

cd
mkdir kamailio 3.1
cd kamailio-3.1
git clone --depth 1 git://git.sip-router.org/sip-router kamailio
cd kamailio
git checkout -b 3.1 origin/3.1

Create the tarball from Kamailio sources:

make FLAVOUR=kamailio tar

Copy Kamailio Spec Files

cd
mv kamailio-3.1/kamailio/kamailio-3.1.2_src.tar.gz rpmbuild/SOURCES/
cp kamailio-3.1/kamailio/pkg/kamailio/rpm/kamailio.init rpmbuild/SOURCES/
cp kamailio-3.1/kamailio/pkg/kamailio/rpm/kamailio.default rpmbuild/SOURCES/
cp kamailio-3.1/kamailio/pkg/kamailio/rpm/kamailio.spec.CentOS rpmbuild/SPECS/

Install Kamailio Build Dependencies

You have to be root to install new packages with yum. You can do it via sudo as well.
yum install make
yum install gcc
yum install flex
yum install bison
yum install mysql-devel
yum install openssl-devel
yum install pcre-devel
yum install postgresql-devel
yum install unixODBC-devel
yum install libxml2-devel
yum install radiusclient-ng-devel
yum install lm_sensors-devel
yum install net-snmp-devel
yum install curl-devel
yum install expat-devel
yum install libconfuse-devel
yum install libpurple-devel
yum install openldap-devel
yum install mod_perl-devel
yum install lua-devel
yum install python-devel
yum install yum install

Build Kamailio RPMs

cd ~/rpmbuild/SPECS
rpmbuild -ba kamailio.spec.CenOS

When everything is finished, you will see next log messages printed in the terminal, which tell the location of RPMs:

...
Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/kamailio-3.1.2-buildroot
Wrote: /home/cezar/rpmbuild/SRPMS/kamailio-3.1.2-0.src.rpm
Wrote: /home/cezar/rpmbuild/RPMS/i386/kamailio-3.1.2-0.i386.rpm
Wrote: /home/cezar/rpmbuild/RPMS/i386/kamailio-mysql-3.1.2-0.i386.rpm
Wrote: /home/cezar/rpmbuild/RPMS/i386/kamailio-postgres-3.1.2-0.i386.rpm
Wrote: /home/cezar/rpmbuild/RPMS/i386/kamailio-unixodbc-3.1.2-0.i386.rpm
Wrote: /home/cezar/rpmbuild/RPMS/i386/kamailio-utils-3.1.2-0.i386.rpm
Wrote: /home/cezar/rpmbuild/RPMS/i386/kamailio-cpl-3.1.2-0.i386.rpm
Wrote: /home/cezar/rpmbuild/RPMS/i386/kamailio-radius-3.1.2-0.i386.rpm
Wrote: /home/cezar/rpmbuild/RPMS/i386/kamailio-snmpstats-3.1.2-0.i386.rpm
Wrote: /home/cezar/rpmbuild/RPMS/i386/kamailio-presence-3.1.2-0.i386.rpm
Wrote: /home/cezar/rpmbuild/RPMS/i386/kamailio-xmpp-3.1.2-0.i386.rpm
Wrote: /home/cezar/rpmbuild/RPMS/i386/kamailio-tls-3.1.2-0.i386.rpm
Wrote: /home/cezar/rpmbuild/RPMS/i386/kamailio-carrierroute-3.1.2-0.i386.rpm
Wrote: /home/cezar/rpmbuild/RPMS/i386/kamailio-purple-3.1.2-0.i386.rpm
Wrote: /home/cezar/rpmbuild/RPMS/i386/kamailio-ldap-3.1.2-0.i386.rpm
Wrote: /home/cezar/rpmbuild/RPMS/i386/kamailio-perl-3.1.2-0.i386.rpm
Wrote: /home/cezar/rpmbuild/RPMS/i386/kamailio-lua-3.1.2-0.i386.rpm
Wrote: /home/cezar/rpmbuild/RPMS/i386/kamailio-python-3.1.2-0.i386.rpm
Wrote: /home/cezar/rpmbuild/RPMS/i386/kamailio-geoip-3.1.2-0.i386.rpm
Wrote: /home/cezar/rpmbuild/RPMS/i386/kamailio-debuginfo-3.1.2-0.i386.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.19156
+ umask 022
+ cd /home/cezar/rpmbuild/BUILD
+ cd kamailio-3.1.2
+ rm -rf /var/tmp/kamailio-3.1.2-buildroot
+ exit 0

100%


Copyright 2010-2020 Asipto.com