Deploying the TURN server
In Chapter 1, Developing a WebRTC Application, we discussed how to install, configure, and deploy a simple STUN server for our needs. Here, we will deal with the TURN server, which can also act as a STUN server. So, you don't need to have both the servers (but you can); you can configure just one and it will work either as a STUN or TURN server.
There are several TURN server implementations on the Internet, and you can take what you like the most, but I'd recommend that you consider the rfc5766-turn-server
project for use in production systems.
You can download the source codes from https://code.google.com/p/rfc5766-turn-server/.
You need to install additional packages before compiling the server, in particular, mysqlclient-dev
, libevent
, libmysqlclient-dev
, libevent-dev
, and libssl-dev
. Kindly note that the package list may vary for different Linux distributions.
Unpack the source code into a folder and run the following command line:
./configure
This will prepare...