MANUAL PROCESS FOR CENTOS 6:


The first thing you need to build/use the TURN server with CentOS is to build and install libevent 2.x.x.  CentOS 6 ships with libevent 1.x.x.  You can find a .spec file to build libevent 2.x.x here: https://github.com/crocodilertc/libevent

To build libevent:

    1) Install the dependencies for building libevent: gcc, make, redhat-rpm-config, doxygen, openssl-devel, rpm-build
    2) $ mkdir ~/rpmbuild
    3) $ mkdir ~/rpmbuild/SOURCES
    4) $ mkdir ~/rpmbuild/SPECS
    5) Put the tarball for libevent (https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz) and put it into ~/rpmbuild/SOURCES
    6) Put the .spec for libevent (https://raw.github.com/crocodilertc/libevent/master/libevent.spec) into ~/rpmbuild/SPECS
    7) Build the RPMs, "rpmbuild -ba ~/rpmbuild/SPECS/libevent.spec"


To build the TURN server:

    1) Install libevent and libevent-devel rpms
    2) Install EPEL (http://fedoraproject.org/wiki/EPEL) - needed for hiredis
    3) Install the dependencies for building the TURN server: gcc, make, redhat-rpm-config, openssl-devel, libevent-devel >= 2.0.0, 
       mysql-devel, postgresql-devel, hiredis-devel
    4) $ mkdir ~/rpmbuild
    5) $ mkdir ~/rpmbuild/SOURCES
    6) Export the TURN server from SVN, "svn export http://rfc5766-turn-server.googlecode.com/svn/trunk/ turnserver-2.6.7.0"
    7) Create a tarball, "tar zcf ~/rpmbuild/SOURCES/turnserver-2.6.7.0.tar.gz turnserver-2.6.7.0"
    8) Build the RPMs, "rpmbuild -ta ~/rpmbuild/SOURCES/turnserver-2.6.7.0.tar.gz"


AUTOMATED PROCESS FOR CENTOS 6:

$ cd <...>/rfc57666-turn-server/rpm
$ ./CentOS6.pre.build.sh
$ ./build.sh
(then see the tarball in ~/rpmbuild/RPMS/<arch>)

AUTOMATED PROCESS FOR Fedora:

$ cd <...>/rfc57666-turn-server/rpm
$ ./Fedora.pre.build.sh
$ ./build.sh
(then see the tarball in ~/rpmbuild/RPMS/<arch>)

