Setting up a development environment

From SIPfoundry sipXecs IP PBX, The Open Source SIP PBX for Linux - Calivia

Jump to: navigation, search


Contents

Introduction

The following instructions apply to Fedora Core (F8 and later) as well as Red Hat Enterprise Linux 5 (RHEL5) and CentOS 5.

If you are not constrained to a particular flavour of Linux, then you should instead use the Express Development Environment Setup.

NOTES

System Setup Prerequisites

Install Linux with SELinux and Firewall off (unless you know what you are doing). These instructions will assume you've installed the minimal package (e.g. No X libraries, compiler, etc). If you've installed more, that's ok, some of the dependencies you'll be asked to install will simply be ignored by the yum install command.

Disable Firewall

Using the Setup Agent run the firewall configuration tool and disable the Linux firewall. If you want to disable the firewall after the installation finished use this command: system-config-securitylevel-tui.

Disable SELinux

SELinux has to be disabled for sipXecs because there is currently no selinux policy file availabe. Fedora and CentOS by default enables SELinux.

File: /etc/selinux/config
SELINUX=disabled

Install Build Tools and Dependencies

yum install gcc gcc-c++ autoconf automake libtool subversion doxygen rpm-build zip \
 httpd-devel openssl-devel jpackage-utils which unzip \
 pcre-devel expat-devel unixODBC-devel createrepo \
 jakarta-commons-beanutils jakarta-commons-collections jakarta-commons-net \
 ant log4j junit ant-commons-logging ant-junit ant-trax ant-nodeps \
 mod_ssl postgresql-server libXp zlib-devel postgresql-devel ruby ruby-devel \
 net-snmp-devel net-snmp-perl

To build dependencies under /lib you will also need:

yum install libpng-devel libart_lgpl-devel freetype freetype-devel oro scons

Note scons may not be in the distro (e.g. F8 and earlier), if not, use this:

wget ftp://mirror.switch.ch/pool/1/mirror/epel/5/x86_64/scons-0.98.1-1.el5.noarch.rpm
rpm -i scons-0.98.1-1.el5.noarch.rpm

Note: On Fedora also install rpmdevtools. On CentOS install redhat-rpm-config.

yum install rpmdevtools redhat-rpm-config

Additional build dependencies to build the FreeSWITCH conferencing server

yum install alsa-lib-devel curl-devel gnutls-devel lzo-devel gdbm-devel \
 mysql-devel ncurses-devel python-devel perl-devel perl-ExtUtils-Embed termcap

Build dependencies for Openfire integration

Install the openfire RPM if you would like to incorporate openfire support:

 sudo yum install sipx-openfire

Installing Remaining Dependencies

Remaining dependencies are dependencies not available from a standard repository. For the most common platforms you can download pre-built dependencies from SIPfoundry. If you are building on a platform not available on SIPfoundry, see Building dependencies. Don't forget to install the Ruby gems once the dependencies are built and installed -- see the gem install commands below.

Fedora 6 or greater:

 yum install rubygems rubygem-rake ruby-postgres w3c-libwww-devel cppunit-devel \ 
   xerces-c-devel
 gem install file-tail     # Run this twice if it fails the first time.
 

Install dependencies not available in Fedora standard repositories. Alternatively you can build these yourself; see Building dependencies.

 wget -P /etc/yum.repos.d http://sipxecs.sipfoundry.org/temp/sipXecs/sipxecs-unstable-fc.repo
 yum install cgicc-devel java-1.6.0-sun-devel ruby-dbi nsis sipx-jasperreports-deps \
    sipx-freeswitch sipx-jasperreports-deps

CentOS5/ RHEL5:

 wget -P /etc/yum.repos.d http://sipxecs.sipfoundry.org/temp/sipXecs/sipxecs-unstable-centos.repo
 yum install cgicc-devel java-1.6.0-sun-devel ruby-dbi rubygems w3c-libwww-devel cppunit \
    ruby-postgres xerces-c-devel jakarta-commons-net nsis sipx-freeswitch sipx-jasperreports-deps
 gem install rake 
 gem install file-tail


Note that these commands will install the java-sun-1.6.0 package. For information on using other versions of Java with sipX, please see the sipx-jvm page

If you want to run all the unit tests you'll also need to install named (the tests that use named will be skipped if named is not found):

 yum install bind

Where next?

See Building from source

Personal tools