turnserver startup configuration

  1. Create a turnserver.service file
    Create a configuration file and copy the following content into the configuration file
[Unit]
Description=turnserver for webrtc
After=network.target

[Service]
Type=forking
User=tester
Group=tester
ExecStart=/home/tester/coturn/coturn/bin/turnserver -o -a -f -user=test:123456 -r Hangzhou
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target
  1. Copy the turnserver.service file to the system
cp turnserver.service  /lib/systemd/system/
  1. Reload
    Run the following command
systemctl daemon-reload
  1. To check whether the loading is successful,
    run the following command
systemctl list-unit-files --type=service | grep turn

If everything is normal, you can see the turnserver related content
insert image description here

  1. start operation
systemctl status turnserver.service
  1. Check running status
systemctl status turnserver.service

insert image description here

Guess you like

Origin blog.csdn.net/TopsLuo/article/details/105540779