Installing from source
If you're goal to to build RPMs, go to Building RPMS on CentOS or Fedora. The instructions on this page are for developers that want to compile and install the source for developing new features OR if binaries are not available for your operating system.
When building from source there are two areas to consider.
- Building non-standard dependencies (e.g. mongodb, freeswitch)
- Building sipXecs components (e.g. sipXproxy, sipXconfig)
For building non-standard dependencies from source, there is no real good way in sipXecs to make this any easier then following the instructions on the individual projects websites. However, if you happen to be working on Fedora, CentOS or Redhat, then there's a good chance the binaries are available for your system and you won't need to build dependencies. After all, you're not developing features for these packages and therefore won't need to recompile often.
Notes
- If you run into any issue on this page, review Building RPMS on CentOS or Fedora for possible related instructions that work for you.
- Be sure to check out Release Engineering Notes section for more useful information
Step 1.) Download and initialize source code
sudo yum install make automake libtool git rpm-build git clone git://github.com/SIPfoundry/sipxecs.git cd sipxecs autoreconf -if
Here we build in a separate directory. It's not strictly necessary, but you'll appreciate separating build from source when you want to build multiple branches, rpms or change build settings. It will also catch Makefile issues where you assume source and build are in same directory which can be a common mistake. The directory name "build" is arbitrary.
mkdir build cd build ../configure
Step 2.) Enabling additional components
By default only core and config modules are compiled. If you wish to add other modules, such as Grandstream phone support, you will need to enable them. You can enable individual projects for compilation or project groups.
Project groups
There are currently 5 project groups that are available for compilation:
- $(sipx_all)
- Compiles all sipX projects
- $(sipx_core)
- Compiles only core sipX projects. Enabled by default
- $(sipx_extra)
- Compiles sipX extra projects
- $(sipx_config)
- Compiles sipXconfig projects. Enabled by default
- $(sipx_lang)
- Compiles sipX language projects
Including/Excluding projects from build.
Now you can define which packages you want to build. For example, if you want to build them all, simply add the following to .modules-include
echo '$(sipx_all)' > .modules-include
But what if you want to exclude a particular package or group of packages? Not to worry, simply add them to the file .modules-exclude. We'll disable the language projects and the sipXgrandstream project as an example:
echo '$(sipx_lang) sipXgrandstream' > .modules-exclude
To get a full list of the projects that will compile, run
make sipx.list
Step 3.) Install dependencies and other setup operations
Not on Fedora, CentOS or Redhat?
As pointed out above, this is only for Fedora, CentOS and Redhat systems. For other distributions, you'll have to install dependencies manually. I would suggest you build them when it's discovered you need them because the compile fails to avoid unnecessary work.
First generate the custom setup script for your system. Feel free to look at setup.sh script to review what is going to happen to your system. Feel free to edit script if you want to change what happens
make setup.sh # install repository to download.sipfoundry.org if you don't already have sipxecs libs installed sudo ln -s sipxecs.repo /etc/yum.repos.d/sipxecs.repo sudo bash -x ./setup.sh
Step 4.) Build and install
Building and installing are in one step. Normally you build then install, but because sipxecs is made up of a lot of separate projects, the easiest and safest way for projects to find each other is to install each project along the way. Don't worry, you don't need to be root to install.
make sipx
Building and installing are in one step. Normally you build then install, but because sipxecs is made up of a lot of separate projects, the easiest and safest way for projects to find each other is to install each project along the way. Don't worry, you don't need to be root to install.
This can take a while. If there's a failure and you've fixed the problem, then just rerun "make sipx". Even if the change is on a project that already compiled, this target will know what to recompile.
If you even want to see what other make targets are available, just type "make" to get help page.
make
Step 5.) Run
You do need root privileges to run sipxecs.
A big part of sipXecs is a configuration system that needs root access to your system to setup postgres, start/stop mongo, even disable firewall. So please be aware of this.
Run sipxecs-setup. Root access is required as many components need to be configured.
sudo /usr/local/sipx/bin/sipxecs-setup