SopPlus Linux Manual

Version 0.3.7

1. Introduction


Different from the versions of Windows and Mac desktop, linux version is a typical Server-Client architecture. In other words, the Linux version will run on server, users will manage SopPlus via web browser.

Linux version includes Streamer and Cache 2 components.
Streamer: same as Streamer on desktop, just run at server, can be multi-instance.
Cache: same as Player on desktop, just run at server, can be multi-instance.

Normally services on linux server will be more stable than services on desktop. this is why linux server version is coming. Streamers and Caches could continuously work on linux server for monthes. So if you want to stream for long time, linux version is a better choose.

Cache is a super node for p2p network as an option. Because server usually has more abundant bandwidth and better network connectivity, caches run a server will share more data for other p2p nodes. Proper deployment of caches will result in good quality of channel.

2. Prerequisites


In order to improve compatibility, SopPlus Linux version is packaged with docker technology, so first install the docker on the Linux server. For example, if your server is a CentOS server, type the following command:

$ sudo yum install docker-ce
$ sudo systemctl start docker
More information of docker installation please refer to https://docs.docker.com/engine/installation/.


3. Install and run SopPlus Linux

3.1 Install and run SopPlus Linux

docker image is released on docker hub, so you just type following command to run SopPlus linux server.

$ docker run -d --net=host -v /var/log:/var/log sopplus/sopplus.linux


3.2 Check docker container

$ docker ps -a

CONTAINER ID        IMAGE                          COMMAND             CREATED             STATUS              PORTS               NAMES
ccd1912afaa4        sopplus/sopplus.linux:v0.3.7   "./SopPlus"         2 days ago          Up 2 days                               cocky_spence
                        
When you see the information as above, SopPlus linux works. Stop docker container

$ docker stop ccd1912afaa4

Start docker container

$ docker start ccd1912afaa4

3.3 Check logs

$ tail -f -n 20 /var/log/sopplus.log

If SopPlus server works, will see logs as following that tell you key informations of the server.

###### SopPlus Linux Server, v: 0.3.8
###### WORKDIR: /sopplus.linux
######################################################################################
######                  --- Web Service ---                                     ######
###### url: http://this.server.ip.address:3000                                  ######
###### port: TCP 3000 (open on firewall for your web client!)                   ######
###### username: admin                                                          ######
###### password: sopplus                                                        ######
######                  --- Streaming Service ---                               ######
###### service port: TCP&UDP 5000, 5001, ... (open for p2p traffic!)            ######
###### play port: TCP 15000, 15001, ... (open for your web client!)             ######
###### monitor enable: true                                                     ######
###### monitor interval: 15000ms                                                ######
###### log level: info                                                          ######
###### log file: /var/log/sopplus.log and /var/log/sopplus-streaming.log        ######
######                  --- Configration File ---                               ######
###### config file: ./config.json                                               ######
###### *** You can change default value via web and editing config file.        ######
######################################################################################
###### SopPlus Linux Server is running successfully!!! 
                        

$ tail -f /var/log/sopplus-streaming.log

Check /var/log/sopplus-streaming.log for streamer and cache operation.

......
[2017-07-21 16:06:55.736] [INFO] streaming - =======> channel monitor is running...
[2017-07-21 16:06:55.736] [INFO] streaming - =======> 2 channels [ 5001, 5002 ]
[2017-07-21 16:06:55.742] [INFO] streaming - 5001 bType: streamer, published: true, state: streaming
[2017-07-21 16:06:55.742] [INFO] streaming - 5001 process exist ...
[2017-07-21 16:06:55.743] [INFO] streaming - 5002 bType: cache, published: true, state: streaming
[2017-07-21 16:06:55.743] [INFO] streaming - 5002 process exist ...
......
                        

3.4 Manage server via web browser

Following the information in log file /var/log/sopplus.log, you can open management page in your web browser as following. (suggest using Chrome!)

4. Change configuration

4.1 Change with web browser

In management page click "Setting" to change default value of server.

4.2 Change with command line

$ docker exec -it container-id vi config.json

{
  "channelList": [],
  "web": {
    "webPort": 3000,
    "username": "admin",
    "password": "sopplus"
  },
  "streaming": {
    "baseServicePort": 5000,
    "enableMonitor": true,
    "monitorInterval": 15000
  },
  "logLevel": "info"
}