OpenSUSE Linux Build Environment for sipXecs
From SIPfoundry sipXecs IP PBX, The Open Source SIP PBX for Linux - Calivia
We are using Open-SUSE Linux 10.2 installed in text mode with firewall disabled.
Setup Repositories
The following basic repositories need to be setup in your system: OSS, NON-OSS, UPDATE. There are many mirrors available for these. A basic description of these repositories is here. You can setup these repositories during installation in YaST, use YaST to set them up later, or use a different package management system.
openSUSE 10.2
openSUSE 10.2: Example Repository URLs:
http://download.opensuse.org/distribution/10.2/repo/oss/ http://download.opensuse.org/distribution/10.2/repo/non-oss/ http://download.suse.com/update/10.2/
Note: Add server name in the top line mirrors.kernel.org. Add path starting with a "/" in the second line.
openSUSE 10.3
openSUSE 10.3: Example Repository URLs:
http://download.opensuse.org/distribution/10.3/repo/oss/ http://download.opensuse.org/distribution/10.3/repo/non-oss/ http://download.opensuse.org/update/10.3/
Additional Repositories:
Some of the required packages are not in the main SuSE repository but can be found in repositories that belong to the SuSE build service. You can either search for the required packages here and load them individually, or install the respective repositories into your system. The needed repositories include:
openSUSE 10.2
Package URL of repository cgicc, cgicc-devel http://download.opensuse.org/repositories/server:http/openSUSE_10.2 ruby-dbi, ruby, ruby-devel, rubygems http://download.opensuse.org/repositories/ruby/openSUSE_10.2 w3c-libwww, w3c-libwww-devel http://download.opensuse.org/repositories/devel:libraries:c_c++/openSUSE_10.2
openSUSE 10.3
Package URL of repository cgicc, cgicc-devel http://download.opensuse.org/repositories/server:http/openSUSE_10.3 ruby-dbi, ruby, ruby-devel, rubygems http://download.opensuse.org/repositories/ruby/openSUSE_10.3 w3c-libwww, w3c-libwww-devel http://download.opensuse.org/repositories/devel:libraries:c_c++/openSUSE_10.3
Additional Information for your Reference:
- Official information from OpenSUSE about adding repositories
- Generating YaST Installation Sources
- Build source RPMs as non-root
- How To Create RPMs and Init Scripts That Are Compatible On Both SUSE Linux and Red Hat Linux
Install Compiler & C++ Tools
yast -i gcc gcc-c++ autoconf automake libtool subversion patch make createrepo yast -i doxygen wget nano sudo bzip2 zip
(Note: bind is desired by the SRV lookup test of sipxtacklib. If not installed the test is skipped.)
Install Java Environment
Install Sun Java 1.5 SDK
yast -i java-1_5_0-sun java-1_5_0-sun-devel
Install Java Build Environment
yast -i ant-junit ant-trax ant-nodeps jakarta-commons-beanutils
Install Dependencies
Note: This requires the additional repositories to be installed (see above).
openSUSE 10.2
yast -i apache2-prefork apache2-devel expat cppunit-devel openssl-devel Xerces-c-devel yast -i zlib-devel unixODBC-devel pcre-devel postgresql-devel yast -i ruby-devel rubygems ruby-dbi cgicc-devel w3c-libwww-devel
openSUSE 10.3
yast -i apache2-prefork apache2-devel expat cppunit libcppunit-devel openssl libopenssl-devel Xerces-c libXerces-c-devel yast -i zlib-devel unixODBC-devel pcre-devel postgresql-devel yast -i ruby-devel rubygems ruby-dbi cgicc-devel w3c-libwww-devel
Install Ruby Rake and file-tail gems (openSUSE 10.2 and 10.3)
gem install rake --no-rdoc gem install file-tail --no-rdoc
Enable sudo
Add the user used to build sipX to the wheel group (this is required so that the RPM build step can install the RPMs):
| File: /etc/group - update as root |
#Add your user name to the wheel group, separated by a comma wheel:x:10:username |
| Code: Update /etc/sudoers file as root |
visudo (or just use your favorite editor) #Uncomment the line: %wheel ALL=(ALL) NOPASSWD: ALL |
Enable Building RPM Packages without being root
The 'rpmbuild process by default expects to read and write in the directories under /usr/src/packages, which ordinary users cannot modify. You can tell rpmbuild to look for and create files in a different set of directories by changing its %_topdir setting.
Create a file in your home directory called .rpmmacros as follows:
| File: ~/.rpmmacros |
%HOME %{expand:%%(cd; pwd)}
%_topdir %{HOME}/rpmbuild
%tmpdir ~/tmp
|
Then create the entire directory tree in your home directory as it is normally found under /usr/src/packages:
| Code: Create build directory tree |
cd ~ mkdir tmp rpmbuild cd rpmbuild mkdir SOURCES SPECS BUILD RPMS SRPMS |
Additional information in this mini HowTo.
Obtain Source Files from svn Repository
Main Development Branch:
| Code: checkout source |
mkdir ~/src cd src svn checkout http://sipxecs.sipfoundry.org/rep/sipXecs/main/ |
Stable Branch Release 3.8:
| Code: checkout source |
mkdir ~/src cd src svn checkout http://sipxecs.sipfoundry.org/rep/sipXecs/branches/3.8/ |
Build sipXecs Specific Dependencies from Source
Note: All the required packages can be obtained either from the SuSE standard repositories or from the SuSE build service (see installation above). Therefore, it is no longer necessary to build dependencies from source.
Build sipXecs from Source
Building sipXconfig
Building sipXconfig requires the following modification to be implemented:
echo "xalan-j2-serializer.jar" > sipxconfig sudo mv sipxconfig /etc/ant.d
Building sipXecs RPMs
| Code: build sipXecs RPMs |
autoreconf -if mkdir RPMBUILD cd RPMBUILD ../configure --cache-file=`pwd`/ac-cache-file --with-distdir=`pwd`/../dist make rpm |
Running all the Unit Tests
To build the system locally and run all the unit tests do this:
sudo mkdir /usr/local/sipx sudo chown <user> /usr/local/sipx
make
Install sipXecs from newly Built RPMs (as root)
If you do this on your build host, first uninstall all the RPMs that got installed during the build process:
rpm -qa | grep sipx | xargs sudo rpm -e --noscript
Creating a local repository
cd dist/RPM createrepo .
Now add that local repository to yast. Once installed it will complain that the repository is not signed. This is a benign error.
Install all the sipxpbx components
yast -i sipxecs
Alternatively install individual packages:
yast -i sipxpbx sipxproxy sipxpublisher sipxregistry sipxacd sipxconfig sipxconfig-agent \
sipxconfig-report sipxconfig-tftp sipxconfig-ftp sipxvxml sipxproxy-cdr sipxconfig-mrtg
The reason why it is componentized is the fact that components can be installed stand-alone on separate hardware once we are fully done.
Note: the package sipxconfig-mrtg is only part of releases >= 3.9.
Final Steps
Next, generate and install a valid SSL certificate and start sipX:
Start sipXpbx:
/etc/init.d/sipxpbx start
Login to the sipXecs Configuration Server Web Interface
Use your favorite browser from a different system with access to the sipXecs server and go to:
http://sipx.your.domain
First, you are asked to define a password for the superadmin user. Once entered successfully, you should then login as user superadmin.
