The preparatory work
- A server or cloud host
- An HTTPS domain name (registered for access)
Install the Coturn service
Dependent installation
yum install -y make gcc gcc-c++ wget openssl-devel libevent libevent-devel
Copy the code
Coturn source code download
Wget HTTP: / / https://github.com/coturn/coturn/archive/4.5.1.1.tar.gzCopy the code
Unpack the
Tar -zxvf 4.5.1.tar. gz CD coturn-4.5.1.1Copy the code
compile
./configure --prefix=/usr/local/turnserver
make && make install
Copy the code
Configuring environment Variables
Bashrc // Add the environment variables export turnServer_HOME =/usr/local/turnserver export PATH=$PATH:$turnServer_home /binCopy the code
Modifying a Configuration File
Find /usr -name turnserver.conf // modify the following content: listening-port=3478 # port relay- IP =10.0.24.10 # Intranet IP address External-ip =81.70.105.238 # external-ip= rty:123456 # realm=xmdrtyCopy the code
Start the Coturn service
/ / if the environment variable is not effective, CD/usr/local/close the window to be reopened turnserver/share/examples/turnserver/etc turnserver - c. /etc/turnserver.confCopy the code
Enable port 3478
test
Address of the test
Install the node
Download the node
CD/usr/local/SRC wget HTTP: / / https://nodejs.org/dist/v12.21.0/node-v12.21.0-linux-x64.tar.xzCopy the code
Unpack the
Tar -xvf node-v12.21.0-linux-x64 node-v12.21.0Copy the code
Modeling of the
Ln -s /usr/local/src/node-v12.21.0/bin/node /usr/bin/node ln -s /usr/local/src/node-v12.21.0/bin/npm /usr/bin/npm/Test node-v npm-vCopy the code
Success
WebRTC source