CentOS7安装部署OpenVidu

news2024/9/20 22:52:24

1:安装Docker

参考:Centos7 安装 Docker_zzhongcy的博客-CSDN博客

2:安装OpenVidu

2.1、OpenVidu 简介

  • OpenVidu Server(openvidu-server):是openvidu平台的大脑,负责信号层。
  • Kurento Media Server(kms):openvidu平台的核心,负责媒体层。
  • Coturm(coturn):用于允许在特殊网络上与浏览器媒体交互的服务器。
  • Redis(redis):管理Coturn服务器上的用户
  • Nginx(nginx):反向代理。用于配置SSL证书并且允许Openvidu服务器与应用通过443端口服务。
  • Videoconference Application(app):openvidu会话应用或者其他应用。可以禁用。

2.1.1 配置安全组

        视频会议功能内部采用WEBRTC技术,会使用比较多的端口,因此需要在轻量服务器的防火墙策略上放行相应的端口,目前官网上要求开放的端口如下。

  • 22 TCP: SSH端口
  • 80 TCP: HTTP端口
  • 443 TCP:HTTPS端口
  • 3478 TCP+UDP: TURN服务器端口,TURN服务器是在视频双方无法直接建立点对点连接时进行流量转发使用
  • 8888 KMS 连接端口
  • 40000 - 57000 TCP+UDP: Kurento Media Server建立媒体连接的端口
  • 57001 - 65535 TCP+UDP: TURN服务器建立媒体连接的端口。

        除此之外,请确保这些端口80, 443, 3478, 5442, 5443, 6379 和 8888不能被占用

        如果嫌麻烦而且仅仅是测试环境使用,可以直接放行所有的端口。

2.1.2 域名解析

        将要使用的域名解析到服务器的IP上。如果使用的是国内的服务器,域名需要备案。如果没有备案的域名,需要选购香港的服务器。或者也可以不使用域名,直接使用IP。直接使用IP的话,需要自己来签发并配置证书并配置浏览器信任证书。

2.2、安装

参考官网:On premises - OpenVidu Docs

2.2.1 切换root权限,并指定安装目录

您需要 root 权限才能部署 OpenVidu。

sudo su

推荐安装 OpenVidu 的文件夹是/opt。文档中有关本地部署的所有其他说明均采用此安装路径。

cd /opt

2.2.2 下载执行install_openvidu_latest.sh

现在执行以下命令来下载并运行安装脚本。

curl https://s3-eu-west-1.amazonaws.com/aws.openvidu.io/install_openvidu_latest.sh | bash 

如果允许失败,则下载install_openvidu_latest.sh文件后,进行权限操作,在运行:

sudo wget https://s3-eu-west-1.amazonaws.com/aws.openvidu.io/install_openvidu_latest.sh
chmod 755 install_openvidu_latest.sh
sudo ./install_openvidu_latest.sh

 install_openvidu_latest.sh 脚本如下

#!/usr/bin/env bash

# Global variables
OPENVIDU_FOLDER=openvidu
OPENVIDU_VERSION=v2.28.0
OPENVIDU_UPGRADABLE_VERSION="2.27"
DOWNLOAD_URL=https://raw.githubusercontent.com/OpenVidu/openvidu/${OPENVIDU_VERSION}

# Support docker compose v1 and v2
shopt -s expand_aliases
alias docker-compose='docker compose'
if ! docker compose version &> /dev/null; then
    unalias docker-compose
fi

# Change default http timeout for slow networks
export COMPOSE_HTTP_TIMEOUT=500
export DOCKER_CLIENT_TIMEOUT=500

fatal_error() {
     printf "\n     =======隆ERROR!======="
     printf "\n     %s" "$1"
     printf "\n"
     exit 1
}

new_ov_installation() {
     printf '\n'
     printf '\n     ======================================='
     printf '\n          Install OpenVidu CE %s' "${OPENVIDU_VERSION}"
     printf '\n     ======================================='
     printf '\n'

     # Create folder openvidu-docker-compose
     printf '\n     => Creating folder '%s'...' "${OPENVIDU_FOLDER}"
     mkdir "${OPENVIDU_FOLDER}" || fatal_error "Error while creating the folder '${OPENVIDU_FOLDER}'"

     # Download necessary files
     printf '\n     => Downloading OpenVidu CE files:'

     curl --silent ${DOWNLOAD_URL}/openvidu-server/deployments/ce/docker-compose/.env \
          --output "${OPENVIDU_FOLDER}/.env" || fatal_error "Error when downloading the file '.env'"
     printf '\n          - .env'

     curl --silent ${DOWNLOAD_URL}/openvidu-server/deployments/ce/docker-compose/docker-compose.override.yml \
          --output "${OPENVIDU_FOLDER}/docker-compose.override.yml" || fatal_error "Error when downloading the file 'docker-compose.override.yml'"
     printf '\n          - docker-compose.override.yml'

     curl --silent ${DOWNLOAD_URL}/openvidu-server/deployments/ce/docker-compose/docker-compose.yml \
          --output "${OPENVIDU_FOLDER}/docker-compose.yml" || fatal_error "Error when downloading the file 'docker-compose.yml'"
     printf '\n          - docker-compose.yml'

     curl --silent ${DOWNLOAD_URL}/openvidu-server/deployments/ce/docker-compose/openvidu \
          --output "${OPENVIDU_FOLDER}/openvidu" || fatal_error "Error when downloading the file 'openvidu'"
     printf '\n          - openvidu'

     # Add execution permissions
     printf "\n     => Adding permission to 'openvidu' program..."
     chmod +x "${OPENVIDU_FOLDER}/openvidu" || fatal_error "Error while adding permission to 'openvidu' program"

     # Change recording folder with all permissions
     printf "\n     => Adding permission to 'recordings' folder..."
     mkdir -p "${OPENVIDU_FOLDER}/recordings"

     # Create own certificated folder
     printf "\n     => Creating folder 'owncert'..."
     mkdir "${OPENVIDU_FOLDER}/owncert" || fatal_error "Error while creating the folder 'owncert'"

     # Create vhost nginx folder
     printf "\n     => Creating folder 'custom-nginx-vhosts'..."
     mkdir "${OPENVIDU_FOLDER}/custom-nginx-vhosts" || fatal_error "Error while creating the folder 'custom-nginx-vhosts'"

     # Create vhost nginx folder
     printf "\n     => Creating folder 'custom-nginx-locations'..."
     mkdir "${OPENVIDU_FOLDER}/custom-nginx-locations" || fatal_error "Error while creating the folder 'custom-nginx-locations'"

     # Ready to use
     printf '\n'
     printf '\n'
     printf '\n     ======================================='
     printf '\n     Openvidu Platform successfully installed.'
     printf '\n     ======================================='
     printf '\n'
     printf '\n     1. Go to openvidu folder:'
     printf '\n     $ cd openvidu'
     printf '\n'
     printf '\n     2. Configure DOMAIN_OR_PUBLIC_IP and OPENVIDU_SECRET in .env file:'
     printf '\n     $ nano .env'
     printf '\n'
     printf '\n     3. Start OpenVidu'
     printf '\n     $ ./openvidu start'
     printf '\n'
     printf '\n     For more information, check:'
     printf '\n     https://docs.openvidu.io/en/%s/deployment/deploying-on-premises/' "${OPENVIDU_VERSION//v}"
     printf '\n'
     printf '\n'
     exit 0
}

upgrade_ov() {
     # Search local Openvidu installation
     printf '\n'
     printf '\n     ============================================'
     printf '\n       Search Previous Installation of Openvidu'
     printf '\n     ============================================'
     printf '\n'

     SEARCH_IN_FOLDERS=(
          "${PWD}"
          "/opt/${OPENVIDU_FOLDER}"
     )

     for folder in "${SEARCH_IN_FOLDERS[@]}"; do
          printf "\n     => Searching in '%s' folder..." "${folder}"

          if [ -f "${folder}/docker-compose.yml" ]; then
               OPENVIDU_PREVIOUS_FOLDER="${folder}"

               printf "\n     => Found installation in folder '%s'" "${folder}"
               break
          fi
     done

     [ -z "${OPENVIDU_PREVIOUS_FOLDER}" ] && fatal_error "No previous Openvidu installation found"

     # Upgrade Openvidu
     OPENVIDU_PREVIOUS_VERSION=$(grep 'Openvidu Version:' "${OPENVIDU_PREVIOUS_FOLDER}/docker-compose.yml" | awk '{ print $4 }')
     [ -z "${OPENVIDU_PREVIOUS_VERSION}" ] && fatal_error "Can't find previous OpenVidu version"

     # In this point using the variable 'OPENVIDU_PREVIOUS_VERSION' we can verify if the upgrade is
     # posible or not. If it is not posible launch a warning and stop the upgrade.
     if [[ "${OPENVIDU_PREVIOUS_VERSION}" != "${OPENVIDU_UPGRADABLE_VERSION}."* ]]; then
          fatal_error "You can't update from version ${OPENVIDU_PREVIOUS_VERSION} to ${OPENVIDU_VERSION}.\nNever upgrade across multiple major versions."
     fi

     # Check installation is a valid OpenVidu edition
     if grep -q '.*image:.*\/openvidu-server-pro:.*' "${OPENVIDU_PREVIOUS_FOLDER}/docker-compose.yml"; then
          if grep -q '.*image:.*\/replication-manager:.*' "${OPENVIDU_PREVIOUS_FOLDER}/docker-compose.yml"; then
               fatal_error "You can't upgrade. Installed version is OpenVidu Enterprise"
          else
               fatal_error "You can't upgrade. Installed version is OpenVidu PRO."
          fi
     fi

     printf '\n'
     printf '\n     ======================================='
     printf '\n       Upgrade OpenVidu CE %s to %s' "${OPENVIDU_PREVIOUS_VERSION}" "${OPENVIDU_VERSION}"
     printf '\n     ======================================='
     printf '\n'

     ROLL_BACK_FOLDER="${OPENVIDU_PREVIOUS_FOLDER}/.old-${OPENVIDU_PREVIOUS_VERSION}"
     TMP_FOLDER="${OPENVIDU_PREVIOUS_FOLDER}/tmp"
     ACTUAL_FOLDER="$PWD"
     USE_OV_CALL=$(grep -E '^        image: openvidu/openvidu-call:.*$' "${OPENVIDU_PREVIOUS_FOLDER}/docker-compose.override.yml" | tr -d '[:space:]')

     printf "\n     Creating rollback folder '%s'..." ".old-${OPENVIDU_PREVIOUS_VERSION}"
     mkdir "${ROLL_BACK_FOLDER}" || fatal_error "Error while creating the folder '.old-${OPENVIDU_PREVIOUS_VERSION}'"

     printf "\n     Creating temporal folder 'tmp'..."
     mkdir "${TMP_FOLDER}" || fatal_error "Error while creating the folder 'temporal'"

     # Download necessary files
     printf '\n     => Downloading new OpenVidu CE files:'

     curl --silent ${DOWNLOAD_URL}/openvidu-server/deployments/ce/docker-compose/docker-compose.yml \
          --output "${TMP_FOLDER}/docker-compose.yml" || fatal_error "Error when downloading the file 'docker-compose.yml'"
     printf '\n          - docker-compose.yml'

     curl --silent ${DOWNLOAD_URL}/openvidu-server/deployments/ce/docker-compose/docker-compose.override.yml \
          --output "${TMP_FOLDER}/docker-compose.override.yml" || fatal_error "Error when downloading the file 'docker-compose.override.yml'"
     printf "\n          - docker-compose.override.yml"

     curl --silent ${DOWNLOAD_URL}/openvidu-server/deployments/ce/docker-compose/.env \
          --output "${TMP_FOLDER}/.env" || fatal_error "Error when downloading the file '.env'"
     printf '\n          - .env'

     curl --silent ${DOWNLOAD_URL}/openvidu-server/deployments/ce/docker-compose/openvidu \
          --output "${TMP_FOLDER}/openvidu" || fatal_error "Error when downloading the file 'openvidu'"
     printf '\n          - openvidu'

     # Downloading new images and stopped actual Openvidu
     printf '\n     => Downloading new images...'
     printf '\n'
     sleep 1

     printf "\n          => Moving to 'tmp' folder..."
     printf '\n'
     cd "${TMP_FOLDER}" || fatal_error "Error when moving to 'tmp' folder"
     docker-compose pull || true

     printf '\n     => Stopping Openvidu...'
     printf '\n'
     sleep 1

     printf "\n          => Moving to 'openvidu' folder..."
     printf '\n'
     cd "${OPENVIDU_PREVIOUS_FOLDER}" || fatal_error "Error when moving to 'openvidu' folder"
     docker-compose down || true

     printf '\n'
     printf '\n     => Moving to working dir...'
     cd "${ACTUAL_FOLDER}" || fatal_error "Error when moving to working dir"

     # Move old files to rollback folder
     printf '\n     => Moving previous installation files to rollback folder:'

     mv "${OPENVIDU_PREVIOUS_FOLDER}/docker-compose.yml" "${ROLL_BACK_FOLDER}" || fatal_error "Error while moving previous 'docker-compose.yml'"
     printf '\n          - docker-compose.yml'

     if [ -n "${USE_OV_CALL}" ]; then
          mv "${OPENVIDU_PREVIOUS_FOLDER}/docker-compose.override.yml" "${ROLL_BACK_FOLDER}" || fatal_error "Error while moving previous 'docker-compose.override.yml'"
          printf '\n          - docker-compose.override.yml'
     fi

     mv "${OPENVIDU_PREVIOUS_FOLDER}/openvidu" "${ROLL_BACK_FOLDER}" || fatal_error "Error while moving previous 'openvidu'"
     printf '\n          - openvidu'

     cp "${OPENVIDU_PREVIOUS_FOLDER}/.env" "${ROLL_BACK_FOLDER}" || fatal_error "Error while moving previous '.env'"
     printf '\n          - .env'

     if [ -d "${OPENVIDU_PREVIOUS_FOLDER}/custom-nginx-vhosts" ]; then
          mv "${OPENVIDU_PREVIOUS_FOLDER}/custom-nginx-vhosts" "${ROLL_BACK_FOLDER}" || fatal_error "Error while moving previous directory 'custom-nginx-vhosts'"
          printf '\n          - custom-nginx-vhosts'
     fi

     if [ -d "${OPENVIDU_PREVIOUS_FOLDER}/custom-nginx-locations" ]; then
          mv "${OPENVIDU_PREVIOUS_FOLDER}/custom-nginx-locations" "${ROLL_BACK_FOLDER}" || fatal_error "Error while moving previous directory 'custom-nginx-locations'"
          printf '\n          - custom-nginx-locations'
     fi

     if [ -d "${OPENVIDU_PREVIOUS_FOLDER}/coturn" ]; then
          mv "${OPENVIDU_PREVIOUS_FOLDER}/coturn" "${ROLL_BACK_FOLDER}" || fatal_error "Error while moving previous directory 'coturn'"
     fi

     # Move tmp files to Openvidu
     printf '\n     => Updating files:'

     mv "${TMP_FOLDER}/docker-compose.yml" "${OPENVIDU_PREVIOUS_FOLDER}" || fatal_error "Error while updating 'docker-compose.yml'"
     printf '\n          - docker-compose.yml'

     if [ -n "${USE_OV_CALL}" ]; then
          mv "${TMP_FOLDER}/docker-compose.override.yml" "${OPENVIDU_PREVIOUS_FOLDER}" || fatal_error "Error while updating 'docker-compose.override.yml'"
          printf '\n          - docker-compose.override.yml'
     else
          mv "${TMP_FOLDER}/docker-compose.override.yml" "${OPENVIDU_PREVIOUS_FOLDER}/docker-compose.override.yml-${OPENVIDU_VERSION}" || fatal_error "Error while updating 'docker-compose.override.yml'"
          printf '\n          - docker-compose.override.yml-%s' "${OPENVIDU_VERSION}"
     fi

     mv "${TMP_FOLDER}/.env" "${OPENVIDU_PREVIOUS_FOLDER}/.env-${OPENVIDU_VERSION}" || fatal_error "Error while moving previous '.env'"
     printf '\n          - .env-%s' "${OPENVIDU_VERSION}"

     mv "${TMP_FOLDER}/openvidu" "${OPENVIDU_PREVIOUS_FOLDER}" || fatal_error "Error while updating 'openvidu'"
     printf '\n          - openvidu'

     printf "\n     => Deleting 'tmp' folder"
     rm -rf "${TMP_FOLDER}" || fatal_error "Error deleting 'tmp' folder"

     # Add execution permissions
     printf "\n     => Adding permission to 'openvidu' program..."
     chmod +x "${OPENVIDU_PREVIOUS_FOLDER}/openvidu" || fatal_error "Error while adding permission to 'openvidu' program"

     # Change recording folder with all permissions
     printf "\n     => Adding permission to 'recordings' folder..."
     mkdir -p "${OPENVIDU_PREVIOUS_FOLDER}/recordings"

     # Define old mode: On Premise or Cloud Formation
     OLD_MODE=$(grep -E "Installation Mode:.*$" "${ROLL_BACK_FOLDER}/docker-compose.yml" | awk '{ print $4,$5 }')
     [ -n "${OLD_MODE}" ] && sed -i -r "s/Installation Mode:.+/Installation Mode: ${OLD_MODE}/" "${OPENVIDU_PREVIOUS_FOLDER}/docker-compose.yml"

     # Ready to use
     printf '\n'
     printf '\n'
     printf '\n     ================================================'
     printf "\n     Openvidu successfully upgraded to version %s" "${OPENVIDU_VERSION}"
     printf '\n     ================================================'
     printf '\n'
     printf "\n     1. A new file 'docker-compose.yml' has been created with the new OpenVidu %s services" "${OPENVIDU_VERSION}"
     printf '\n'
     printf "\n     2. The previous file '.env' remains intact, but a new file '.env-%s' has been created." "${OPENVIDU_VERSION}"
     printf "\n     Transfer any configuration you wish to keep in the upgraded version from '.env' to '.env-%s'." "${OPENVIDU_VERSION}"
     printf "\n     When you are OK with it, rename and leave as the only '.env' file of the folder the new '.env-%s'." "${OPENVIDU_VERSION}"
     printf '\n'
     printf "\n     3. If you were using Openvidu Call application, it has been automatically updated in file 'docker-compose.override.yml'."
     printf "\n     However, if you were using your own application, a file called 'docker-compose.override.yml-%s'" "${OPENVIDU_VERSION}"
     printf "\n     has been created with the latest version of Openvidu Call. If you don't plan to use it you can delete it."
     printf '\n'
     printf '\n     4. Start new version of Openvidu'
     printf '\n     $ ./openvidu start'
     printf '\n'
     printf "\n     If you want to rollback, all the files from the previous installation have been copied to folder '.old-%s'" "${OPENVIDU_PREVIOUS_VERSION}"
     printf '\n'
     printf '\n     For more information, check:'
     printf '\n     https://docs.openvidu.io/en/%s/deployment/deploying-on-premises/' "${OPENVIDU_VERSION//v}"
     printf '\n     https://docs.openvidu.io/en/%s/deployment/upgrading/' "${OPENVIDU_VERSION//v}"
     printf '\n'
     printf '\n'
}

# Check docker and docker-compose installation
if ! command -v docker > /dev/null; then
     echo "You don't have docker installed, please install it and re-run the command"
     exit 1
else
     # Check version of docker is equal or higher than 20.10.10
     DOCKER_VERSION=$(docker version --format '{{.Server.Version}}' | sed "s/-rc[0-9]*//")
     if ! printf '%s\n%s\n' "20.10.10" "$DOCKER_VERSION" | sort -V -C; then
          echo "You need a docker version equal or higher than 20.10.10, please update your docker and re-run the command"; \
          exit 1
     fi
fi

if ! command -v docker-compose > /dev/null; then
     echo "You don't have docker-compose installed, please install it and re-run the command"
     exit 1
else
     COMPOSE_VERSION=$(docker-compose version --short | sed "s/-rc[0-9]*//")
     if ! printf '%s\n%s\n' "1.24" "$COMPOSE_VERSION" | sort -V -C; then
          echo "You need a docker-compose version equal or higher than 1.24, please update your docker-compose and re-run the command"; \
          exit 1
     fi
fi

# Check type of installation
if [[ -n "$1" && "$1" == "upgrade" ]]; then
     upgrade_ov
else
     new_ov_installation
fi

install_openvidu_latest.sh内部的操作,是依次下载:

  • https://raw.githubusercontent.com/OpenVidu/openvidu/v2.28.0/openvidu-server/deployments/ce/docker-compose/.env
  • https://raw.githubusercontent.com/OpenVidu/openvidu/v2.28.0//openvidu-server/deployments/ce/docker-compose/docker-compose.override.yml
  • https://raw.githubusercontent.com/OpenVidu/openvidu/v2.28.0/openvidu-server/deployments/ce/docker-compose/docker-compose.yml
  • https://raw.githubusercontent.com/OpenVidu/openvidu/v2.28.0/openvidu-server/deployments/ce/docker-compose/openvidu

.env其对应脚本为:

# OpenVidu configuration
# ----------------------
# Documentation: https://docs.openvidu.io/en/stable/reference-docs/openvidu-config/

# NOTE: This file doesn't need to quote assignment values, like most shells do.
# All values are stored as-is, even if they contain spaces, so don't quote them.

# Domain name. If you do not have one, the public IP of the machine.
# For example: 198.51.100.1, or openvidu.example.com
DOMAIN_OR_PUBLIC_IP=

# OpenVidu SECRET used for apps to connect to OpenVidu server and users to access to OpenVidu Dashboard
OPENVIDU_SECRET=

# Certificate type:
# - selfsigned:  Self signed certificate. Not recommended for production use.
#                Users will see an ERROR when connected to web page.
# - owncert:     Valid certificate purchased in a Internet services company.
#                Please put the certificates files inside folder ./owncert
#                with names certificate.key and certificate.cert
# - letsencrypt: Generate a new certificate using letsencrypt. Please set the
#                required contact email for Let's Encrypt in LETSENCRYPT_EMAIL
#                variable.
CERTIFICATE_TYPE=selfsigned

# If CERTIFICATE_TYPE=letsencrypt, you need to configure a valid email for notifications
LETSENCRYPT_EMAIL=user@example.com

# Proxy configuration
# If you want to change the ports on which openvidu listens, uncomment the following lines

# Allows any request to http://DOMAIN_OR_PUBLIC_IP:HTTP_PORT/ to be automatically
# redirected to https://DOMAIN_OR_PUBLIC_IP:HTTPS_PORT/.
# WARNING: the default port 80 cannot be changed during the first boot
# if you have chosen to deploy with the option CERTIFICATE_TYPE=letsencrypt
# HTTP_PORT=80

# Changes the port of all services exposed by OpenVidu.
# SDKs, REST clients and browsers will have to connect to this port
# HTTPS_PORT=443

# Old paths are considered now deprecated, but still supported by default. 
# OpenVidu Server will log a WARN message every time a deprecated path is called, indicating 
# the new path that should be used instead. You can set property SUPPORT_DEPRECATED_API=false 
# to stop allowing the use of old paths.
# Default value is true
# SUPPORT_DEPRECATED_API=false

# If true request to with www will be redirected to non-www requests
# Default value is false
# REDIRECT_WWW=false

# How many workers to configure in nginx proxy. 
# The more workers, the more requests will be handled
# Default value is 10240
# WORKER_CONNECTIONS=10240

# Access restrictions
# In this section you will be able to restrict the IPs from which you can access to
# Openvidu API and the Administration Panel
# WARNING! If you touch this configuration you can lose access to the platform from some IPs.
# Use it carefully.

# This section limits access to the /dashboard (OpenVidu CE) and /inspector (OpenVidu Pro) pages.
# The form for a single IP or an IP range is:
# ALLOWED_ACCESS_TO_DASHBOARD=198.51.100.1 and ALLOWED_ACCESS_TO_DASHBOARD=198.51.100.0/24
# To limit multiple IPs or IP ranges, separate by commas like this:
# ALLOWED_ACCESS_TO_DASHBOARD=198.51.100.1, 198.51.100.0/24
# ALLOWED_ACCESS_TO_DASHBOARD=

# This section limits access to the Openvidu REST API.
# The form for a single IP or an IP range is:
# ALLOWED_ACCESS_TO_RESTAPI=198.51.100.1 and ALLOWED_ACCESS_TO_RESTAPI=198.51.100.0/24
# To limit multiple IPs or or IP ranges, separate by commas like this:
# ALLOWED_ACCESS_TO_RESTAPI=198.51.100.1, 198.51.100.0/24
# ALLOWED_ACCESS_TO_RESTAPI=

# Whether to enable recording module or not
OPENVIDU_RECORDING=false

# Use recording module with debug mode.
OPENVIDU_RECORDING_DEBUG=false

# Openvidu Folder Record used for save the openvidu recording videos. Change it
# with the folder you want to use from your host.
OPENVIDU_RECORDING_PATH=/opt/openvidu/recordings

# System path where OpenVidu Server should look for custom recording layouts
OPENVIDU_RECORDING_CUSTOM_LAYOUT=/opt/openvidu/custom-layout

# if true any client can connect to
# https://OPENVIDU_SERVER_IP:OPENVIDU_PORT/recordings/any_session_file.mp4
# and access any recorded video file. If false this path will be secured with
# OPENVIDU_SECRET param just as OpenVidu Server dashboard at
# https://OPENVIDU_SERVER_IP:OPENVIDU_PORT
# Values: true | false
OPENVIDU_RECORDING_PUBLIC_ACCESS=false

# Which users should receive the recording events in the client side
# (recordingStarted, recordingStopped). Can be all (every user connected to
# the session), publisher_moderator (users with role 'PUBLISHER' or
# 'MODERATOR'), moderator (only users with role 'MODERATOR') or none
# (no user will receive these events)
OPENVIDU_RECORDING_NOTIFICATION=publisher_moderator

# Timeout in seconds for recordings to automatically stop (and the session involved to be closed)
# when conditions are met: a session recording is started but no user is publishing to it or a session
# is being recorded and last user disconnects. If a user publishes within the timeout in either case,
# the automatic stop of the recording is cancelled
# 0 means no timeout
OPENVIDU_RECORDING_AUTOSTOP_TIMEOUT=120

# Maximum video bandwidth sent from clients to OpenVidu Server, in kbps.
# 0 means unconstrained
OPENVIDU_STREAMS_VIDEO_MAX_RECV_BANDWIDTH=1000

# Minimum video bandwidth sent from clients to OpenVidu Server, in kbps.
# 0 means unconstrained
OPENVIDU_STREAMS_VIDEO_MIN_RECV_BANDWIDTH=300

# Maximum video bandwidth sent from OpenVidu Server to clients, in kbps.
# 0 means unconstrained
OPENVIDU_STREAMS_VIDEO_MAX_SEND_BANDWIDTH=1000

# Minimum video bandwidth sent from OpenVidu Server to clients, in kbps.
# 0 means unconstrained
OPENVIDU_STREAMS_VIDEO_MIN_SEND_BANDWIDTH=300

# All sessions of OpenVidu will try to force this codec. If OPENVIDU_STREAMS_ALLOW_TRANSCODING=true
# when a codec can not be forced, transcoding will be allowed
# Values: MEDIA_SERVER_PREFERRED, NONE, VP8, VP9, H264
# Default value is MEDIA_SERVER_PREFERRED
# OPENVIDU_STREAMS_FORCED_VIDEO_CODEC=MEDIA_SERVER_PREFERRED

# Allow transcoding if codec specified in OPENVIDU_STREAMS_FORCED_VIDEO_CODEC can not be applied
# Values: true | false
# Default value is false
# OPENVIDU_STREAMS_ALLOW_TRANSCODING=false

# true to enable OpenVidu Webhook service. false' otherwise
# Values: true | false
OPENVIDU_WEBHOOK=false

# HTTP endpoint where OpenVidu Server will send Webhook HTTP POST messages
# Must be a valid URL: http(s)://ENDPOINT
#OPENVIDU_WEBHOOK_ENDPOINT=

# List of headers that OpenVidu Webhook service will attach to HTTP POST messages
#OPENVIDU_WEBHOOK_HEADERS=

# List of events that will be sent by OpenVidu Webhook service
# Default value is all available events
OPENVIDU_WEBHOOK_EVENTS=[sessionCreated,sessionDestroyed,participantJoined,participantLeft,webrtcConnectionCreated,webrtcConnectionDestroyed,recordingStatusChanged,filterEventDispatched,mediaNodeStatusChanged,nodeCrashed,nodeRecovered,broadcastStarted,broadcastStopped]

# How often the garbage collector of non active sessions runs.
# This helps cleaning up sessions that have been initialized through
# REST API (and maybe tokens have been created for them) but have had no users connected.
# Default to 900s (15 mins). 0 to disable non active sessions garbage collector
OPENVIDU_SESSIONS_GARBAGE_INTERVAL=900

# Minimum time in seconds that a non active session must have been in existence
# for the garbage collector of non active sessions to remove it. Default to 3600s (1 hour).
# If non active sessions garbage collector is disabled
# (property 'OPENVIDU_SESSIONS_GARBAGE_INTERVAL' to 0) this property is ignored
OPENVIDU_SESSIONS_GARBAGE_THRESHOLD=3600

# Call Detail Record enabled
# Whether to enable Call Detail Record or not
# Values: true | false
OPENVIDU_CDR=false

# Path where the cdr log files are hosted
OPENVIDU_CDR_PATH=/opt/openvidu/cdr

# Kurento Media Server image
# --------------------------
# Docker hub kurento media server: https://hub.docker.com/r/kurento/kurento-media-server
# Uncomment the next line and define this variable with KMS image that you want use
# KMS_IMAGE=kurento/kurento-media-server:7.0.1

# Kurento Media Server Level logs
# -------------------------------
# Uncomment the next line and define this variable to change
# the verbosity level of the logs of KMS
# Documentation: https://doc-kurento.readthedocs.io/en/stable/features/logging.html
# KMS_DOCKER_ENV_GST_DEBUG=

# Openvidu Server Level logs
# --------------------------
# Uncomment the next line and define this variable to change
# the verbosity level of the logs of Openvidu Service
# RECOMENDED VALUES: INFO for normal logs DEBUG for more verbose logs
# OV_CE_DEBUG_LEVEL=INFO

# Java Options
# --------------------------
# Uncomment the next line and define this to add
# options to java command
# Documentation: https://docs.oracle.com/cd/E37116_01/install.111210/e23737/configuring_jvm.htm#OUDIG00058
# JAVA_OPTIONS=-Xms2048m -Xmx4096m -Duser.timezone=UTC

docker-compose.override.yml为

version: '3.1'

services:
    # --------------------------------------------------------------
    #
    #    Change this if your want use your own application.
    #    It's very important expose your application in port 5442
    #    and use the http protocol.
    #
    #    Default Application
    #
    #    Openvidu-Call Version: 2.28.0
    #
    # --------------------------------------------------------------
    app:
        image: openvidu/openvidu-call:2.28.0
        restart: on-failure
        network_mode: host
        environment:
            - SERVER_PORT=5442
            - OPENVIDU_URL=http://localhost:5443
            - OPENVIDU_SECRET=${OPENVIDU_SECRET}
            - CALL_OPENVIDU_CERTTYPE=${CERTIFICATE_TYPE}
            - CALL_PRIVATE_ACCESS=${CALL_PRIVATE_ACCESS:-}
            - CALL_USER=${CALL_USER:-}
            - CALL_SECRET=${CALL_SECRET:-}
            - CALL_ADMIN_SECRET=${CALL_ADMIN_SECRET:-}
            - CALL_RECORDING=${CALL_RECORDING:-}
        logging:
            options:
                max-size: "${DOCKER_LOGS_MAX_SIZE:-100M}"

docker-compose.yml为

# ------------------------------------------------------------------------------
#
#    DO NOT MODIFY THIS FILE !!!
#
#    Configuration properties should be specified in .env file
#
#    Application based on OpenVidu should be specified in
#    docker-compose.override.yml file
#
#    This docker-compose file coordinates all services of OpenVidu CE Platform
#
#    This file will be overridden when update OpenVidu Platform
#
#    Openvidu Version: 2.28.0
#
#    Installation Mode: On Premises
#
# ------------------------------------------------------------------------------

version: '3.1'

services:

    openvidu-server:
        image: openvidu/openvidu-server:2.28.0
        restart: on-failure
        network_mode: host
        entrypoint: ['/usr/local/bin/entrypoint.sh']
        volumes:
            - ./coturn:/run/secrets/coturn
            - /var/run/docker.sock:/var/run/docker.sock
            - ${OPENVIDU_RECORDING_PATH}:${OPENVIDU_RECORDING_PATH}
            - ${OPENVIDU_RECORDING_CUSTOM_LAYOUT}:${OPENVIDU_RECORDING_CUSTOM_LAYOUT}
            - ${OPENVIDU_CDR_PATH}:${OPENVIDU_CDR_PATH}
        env_file:
            - .env
        environment:
            - SERVER_SSL_ENABLED=false
            - SERVER_PORT=5443
            - KMS_URIS=["ws://localhost:8888/kurento"]
            - COTURN_IP=${COTURN_IP:-auto-ipv4}
            - COTURN_PORT=${COTURN_PORT:-3478}
        logging:
            options:
                max-size: "${DOCKER_LOGS_MAX_SIZE:-100M}"

    kms:
        image: ${KMS_IMAGE:-kurento/kurento-media-server:7.0.1}
        restart: always
        network_mode: host
        ulimits:
          core: -1
        volumes:
            - /opt/openvidu/kms-crashes:/opt/openvidu/kms-crashes
            - ${OPENVIDU_RECORDING_PATH}:${OPENVIDU_RECORDING_PATH}
            - /opt/openvidu/kurento-logs:/opt/openvidu/kurento-logs
        environment:
            - KMS_MIN_PORT=40000
            - KMS_MAX_PORT=57000
            - GST_DEBUG=${KMS_DOCKER_ENV_GST_DEBUG:-}
            - KURENTO_LOG_FILE_SIZE=${KMS_DOCKER_ENV_KURENTO_LOG_FILE_SIZE:-100}
            - KURENTO_LOGS_PATH=/opt/openvidu/kurento-logs
        logging:
            options:
                max-size: "${DOCKER_LOGS_MAX_SIZE:-100M}"

    coturn:
        image: openvidu/openvidu-coturn:2.28.0
        restart: on-failure
        ports:
            - "${COTURN_PORT:-3478}:${COTURN_PORT:-3478}/tcp"
            - "${COTURN_PORT:-3478}:${COTURN_PORT:-3478}/udp"
        env_file:
            - .env
        volumes:
            - ./coturn:/run/secrets/coturn
        command:
            - --log-file=stdout
            - --listening-port=${COTURN_PORT:-3478}
            - --fingerprint
            - --min-port=${COTURN_MIN_PORT:-57001}
            - --max-port=${COTURN_MAX_PORT:-65535}
            - --realm=openvidu
            - --verbose
            - --use-auth-secret
            - --static-auth-secret=$${COTURN_SHARED_SECRET_KEY}
        logging:
            options:
                max-size: "${DOCKER_LOGS_MAX_SIZE:-100M}"

    nginx:
        image: openvidu/openvidu-proxy:2.28.0
        restart: always
        network_mode: host
        volumes:
            - ./certificates:/etc/letsencrypt
            - ./owncert:/owncert
            - ./custom-nginx-vhosts:/etc/nginx/vhost.d/
            - ./custom-nginx-locations:/custom-nginx-locations
            - ${OPENVIDU_RECORDING_CUSTOM_LAYOUT}:/opt/openvidu/custom-layout
        environment:
            - DOMAIN_OR_PUBLIC_IP=${DOMAIN_OR_PUBLIC_IP}
            - CERTIFICATE_TYPE=${CERTIFICATE_TYPE}
            - LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
            - PROXY_HTTP_PORT=${HTTP_PORT:-}
            - PROXY_HTTPS_PORT=${HTTPS_PORT:-}
            - PROXY_HTTPS_PROTOCOLS=${HTTPS_PROTOCOLS:-}
            - PROXY_HTTPS_CIPHERS=${HTTPS_CIPHERS:-}
            - PROXY_HTTPS_HSTS=${HTTPS_HSTS:-}
            - ALLOWED_ACCESS_TO_DASHBOARD=${ALLOWED_ACCESS_TO_DASHBOARD:-}
            - ALLOWED_ACCESS_TO_RESTAPI=${ALLOWED_ACCESS_TO_RESTAPI:-}
            - PROXY_MODE=CE
            - WITH_APP=true
            - SUPPORT_DEPRECATED_API=${SUPPORT_DEPRECATED_API:-false}
            - REDIRECT_WWW=${REDIRECT_WWW:-false}
            - WORKER_CONNECTIONS=${WORKER_CONNECTIONS:-10240}
            - PUBLIC_IP=${PROXY_PUBLIC_IP:-auto-ipv4}
        logging:
            options:
                max-size: "${DOCKER_LOGS_MAX_SIZE:-100M}"

openvidu为:

#!/bin/bash

# Support docker compose v1 and v2
shopt -s expand_aliases
alias docker-compose='docker compose'
if ! docker compose version &> /dev/null; then
    unalias docker-compose
fi

# Change default http timeout for slow networks
export COMPOSE_HTTP_TIMEOUT=500
export DOCKER_CLIENT_TIMEOUT=500

upgrade_ov() {
  UPGRADE_SCRIPT_URL="https://s3-eu-west-1.amazonaws.com/aws.openvidu.io/install_openvidu_OVVERSION.sh"
  HTTP_STATUS=$(curl -s -o /dev/null -I -w "%{http_code}" ${UPGRADE_SCRIPT_URL//OVVERSION/$1})

  printf "  => Upgrading OpenVidu CE to '%s' version" "$1"

  if [ "$HTTP_STATUS" == "200" ]; then
    printf "\n    => Downloading and upgrading new version"
    printf "\n"

    curl --silent ${UPGRADE_SCRIPT_URL//OVVERSION/$1} | bash -s upgrade
  else
     printf "\n     =======¡ERROR!======="
     printf "\n     OpenVidu CE Version '%s' not exist" "$1"
     printf "\n"
     exit 0
  fi
}

collect_basic_information() {
  LINUX_VERSION=$(lsb_release -d)
  DOCKER_PS=$(docker ps)
  DOCKER_VERSION=$(docker version --format '{{.Server.Version}}')
  DOCKER_COMPOSE_VERSION=$(docker-compose version --short)
  OV_FOLDER="${PWD}"
  OV_VERSION=$(grep 'Openvidu Version:' "${OV_FOLDER}/docker-compose.yml" | awk '{ print $4 }')
  CONTAINERS=$(docker ps | awk '{if(NR>1) print $NF}')

  if [ -n "$(grep -E '^        image: openvidu/openvidu-call:.*$' "${OV_FOLDER}/docker-compose.override.yml" | tr -d '[:space:]')" ]; then
    OV_CALL_VERSION=$(grep -E 'Openvidu-Call Version:' "${OV_FOLDER}/docker-compose.override.yml" | awk '{ print $4 }')
  fi
  [ -z "${OV_CALL_VERSION}" ] && OV_CALL_VERSION="No present"

  OV_TYPE_INSTALLATION=$(grep 'Installation Mode:' "${OV_FOLDER}/docker-compose.yml" | awk '{ print $4,$5 }')
  TREE_OV_DIRECTORY=$(find "." | sed -e "s/[^-][^\/]*\// |/g" -e "s/|\([^ ]\)/|-\1/")
}

version_ov() {
  collect_basic_information

  printf '\nOpenvidu Information:'
  printf '\n'
  printf '\n  Installation Type: %s' "${OV_TYPE_INSTALLATION}"
  printf '\n  Openvidu Version: %s' "${OV_VERSION}"
  printf '\n  Openvidu Call Version: %s' "${OV_CALL_VERSION}"
  printf '\n'
  printf '\nSystem Information:'
  printf '\n'
  printf '\n  Linux Version:'
  printf '\n    - %s' "${LINUX_VERSION}"
  printf '\n  Docker Version: %s' "${DOCKER_VERSION}"
  printf '\n  Docker Compose Version: %s' "${DOCKER_COMPOSE_VERSION}"
  printf '\n'
  printf '\nInstallation Information:'
  printf '\n'
  printf '\n  Installation Folder: %s' "${OV_FOLDER}"
  printf '\n  Installation Folder Tree:'
  printf '\n%s' "$(echo "${TREE_OV_DIRECTORY}" | sed -e 's/.//' -e ':a' -e 'N;$!ba' -e 's/\n/\n\t/g')"
  printf '\n'
  printf '\nDocker Running Services:'
  printf '\n'
  printf '\n  %s' "$(echo "${DOCKER_PS}" | sed -e ':a' -e 'N;$!ba' -e 's/\n/\n\t/g')"
  printf '\n'
}

generate_report() {
  collect_basic_information

  REPORT_CREATION_DATE=$(date +"%d-%m-%Y")
  REPORT_CREATION_TIME=$(date +"%H:%M:%S")
  REPORT_NAME="openvidu-report-${REPORT_CREATION_DATE}-$(date +"%H-%M").txt"
  REPORT_OUTPUT="${OV_FOLDER}/${REPORT_NAME}"

  {
    printf "\n  ======================================="
    printf "\n  =         REPORT INFORMATION          ="
    printf "\n  ======================================="
    printf '\n'
    printf '\n  Creation Date: %s' "${REPORT_CREATION_DATE}"
    printf '\n  Creation Time: %s' "${REPORT_CREATION_TIME}"
    printf '\n'
    printf "\n  ======================================="
    printf "\n  =       OPENVIDU INFORMATION          ="
    printf "\n  ======================================="
    printf '\n'
    printf '\n  Installation Type: %s' "${OV_TYPE_INSTALLATION}"
    printf '\n  Openvidu Version: %s' "${OV_VERSION}"
    printf '\n  Openvidu Call Version: %s' "${OV_CALL_VERSION}"
    printf '\n'
    printf "\n  ======================================="
    printf "\n  =         SYSTEM INFORMATION          ="
    printf "\n  ======================================="
    printf '\n'
    printf '\n  Linux Version:'
    printf '\n    - %s' "${LINUX_VERSION}"
    printf '\n  Docker Version: %s' "${DOCKER_VERSION}"
    printf '\n  Docker Compose Version: %s' "${DOCKER_COMPOSE_VERSION}"
    printf '\n'
    printf "\n  ======================================="
    printf "\n  =     INSTALLATION INFORMATION        ="
    printf "\n  ======================================="
    printf '\n'
    printf '\n  Installation Folder: %s' "${OV_FOLDER}"
    printf '\n  Installation Folder Tree:'
    printf '\n%s' "$(echo "${TREE_OV_DIRECTORY}" | sed -e 's/.//' -e ':a' -e 'N;$!ba' -e 's/\n/\n\t/g')"
    printf '\n'
    printf "\n  ======================================="
    printf "\n  =      DOCKER RUNNING SERVICES        ="
    printf "\n  ======================================="
    printf '\n'
    printf '\n  %s' "$(echo "${DOCKER_PS}" | sed -e ':a' -e 'N;$!ba' -e 's/\n/\n\t/g')"
    printf '\n'
    printf "\n  ======================================="
    printf "\n  =        CONFIGURATION FILES          ="
    printf "\n  ======================================="
    printf '\n'
    printf '\n  ================ .env ================='
    printf '\n'
    printf '\n'

    cat < "${OV_FOLDER}/.env" | sed -r -e "s/OPENVIDU_SECRET=.+/OPENVIDU_SECRET=****/"

    printf '\n'
    printf '\n  ========= docker-compose.yml =========='
    printf '\n'
    printf '\n'

    cat "${OV_FOLDER}/docker-compose.yml"

    printf '\n'
    printf '\n  ==== docker-compose.override.yml ===='
    printf '\n'
    printf '\n'

    if [ -f "${OV_FOLDER}/docker-compose.override.yml" ]; then
      cat < "${OV_FOLDER}/docker-compose.override.yml"
    else
      printf '\n  The docker-compose.override.yml file is not present'
    fi

    printf '\n'
    printf '\n'
    printf "\n  ======================================="
    printf "\n  =                LOGS                 ="
    printf "\n  ======================================="

    for CONTAINER in $CONTAINERS
    do
      printf '\n'
      printf "\n  ---------------------------------------"
      printf "\n  %s" "$CONTAINER"
      printf "\n  ---------------------------------------"
      printf '\n'
      docker logs "$CONTAINER"
      printf "\n  ---------------------------------------"
      printf '\n'
      printf '\n'
    done

    printf '\n'
    printf "\n  ---------------------------------------"
    printf "\n  KMS"
    printf "\n  ---------------------------------------"
    printf '\n'
    kurento_logs
    printf "\n  ---------------------------------------"
    printf '\n'
    printf '\n'

    printf "\n  ======================================="
    printf "\n  =       CONTAINER ENVS VARIABLES      ="
    printf "\n  ======================================="

    for CONTAINER in $CONTAINERS
    do
      printf '\n'
      printf "\n  ======================================="
      printf "\n  %s" "$CONTAINER"
      printf "\n  ---------------------------------------"
      printf '\n'
      docker exec "$CONTAINER" env
      printf "\n  ---------------------------------------"
      printf '\n'
      printf '\n'
    done

  } >> "${REPORT_OUTPUT}" 2>&1

  printf "\n  Generation of the report completed with success"
  printf "\n  You can get your report at path '%s'" "${REPORT_OUTPUT}"
  printf "\n"
}

usage() {
    printf "Usage: \n\t openvidu [command]"
    printf "\n\nAvailable Commands:"
    printf "\n\tstart\t\t\tStart all services"
    printf "\n\tstop\t\t\tStop all services"
    printf "\n\trestart\t\t\tRestart all stopped and running services"
    printf "\n\tlogs [-f]\t\tShow openvidu logs."
    printf "\n\tkms-logs [-f]\t\tShow kms logs"
    printf "\n\tupgrade\t\t\tUpgrade to the latest Openvidu version"
    printf "\n\tupgrade [version]\tUpgrade to the specific Openvidu version"
    printf "\n\tversion\t\t\tShow version of Openvidu Server"
    printf "\n\treport\t\t\tGenerate a report with the current status of Openvidu"
    printf "\n\thelp\t\t\tShow help for openvidu command"
    printf "\n"
}

kurento_logs() {
  if [[ "$1" == "-f" ]]; then
    tail -f /opt/openvidu/kurento-logs/*.log
  else
    cat /opt/openvidu/kurento-logs/*.log
  fi
}

[[ -z "${FOLLOW_OPENVIDU_LOGS}" ]] && FOLLOW_OPENVIDU_LOGS=true

case $1 in
  start)
    docker-compose up -d
    if [[ "${FOLLOW_OPENVIDU_LOGS}" == "true" ]]; then
      docker-compose logs -f --tail 10 openvidu-server
    fi
    ;;

  stop)
    docker-compose down
    ;;

  restart)
    docker-compose down
    docker-compose up -d
    if [[ "${FOLLOW_OPENVIDU_LOGS}" == "true" ]]; then
      docker-compose logs -f --tail 10 openvidu-server
    fi
    ;;

  logs)
    case "${2-}" in
      --follow|-f)
        docker-compose logs -f --tail 10 openvidu-server
        ;;
      *)
        docker-compose logs openvidu-server
        ;;
    esac
    ;;

  kms-logs)
    kurento_logs "$2"
    ;;

  upgrade)
    if [ -z "$2" ]; then
      UPGRADE_VERSION="latest"
    else
      UPGRADE_VERSION="$2"
    fi

    read -r -p "  You're about to update OpenVidu CE to '${UPGRADE_VERSION}' version. Are you sure? [y/N]: " response
    case "$response" in
      [yY][eE][sS]|[yY])
        upgrade_ov "${UPGRADE_VERSION}"
        ;;
      *)
        exit 0
        ;;
    esac
    ;;

  version)
    version_ov
    ;;

  report)
    read -r -p "  You are about to generate a report on the current status of Openvidu, this may take some time. Do you want to continue? [y/N]: " response
    case "$response" in
      [yY][eE][sS]|[yY])
        generate_report
        ;;
      *)
        exit 0
        ;;
    esac
    ;;

  *)
    usage
    ;;
esac

2.2.3 启动openvidu

        这会将所有必需的文件下载到openvidu文件夹中,并显示此消息和基本说明:

        使用熟悉的工具来编辑.env文件,需要修改下面几项配置。

DOMAIN_OR_PUBLIC_IP=自己的域名

OPENVIDU_SECRET=xxxxxx #密钥,换成一个安全系数高的

LETSENCRYPT_EMAIL=xx@xx.com #换成自己的邮箱

或者不使用letsencrypt签发证书,来自行配置证书。HTTPS_PORT默认为443

=======================================
Openvidu Platform successfully installed.
=======================================

1. Go to openvidu folder:
$ cd openvidu

2. Configure DOMAIN_OR_PUBLIC_IP and OPENVIDU_SECRET in .env file:
$ nano .env

3. Start OpenVidu
$ ./openvidu start

For more information, check:
https://docs.openvidu.io/en/stable/deployment/ce/on-premises/

要部署固定版本(包括以前的版本),请替换latest为所需的版本号。
例如:curl https://s3-eu-west-1.amazonaws.com/aws.openvidu.io/install_openvidu_2.28.0.sh | bash

./openvidu start此命令会拉取并启动相应服务的docker镜像,执行完毕后,可以用一下命令查看进程:

sudo docker ps

启动成功

实时跟踪docker日志

docker logs --follow openvidu-kms-1

检验是否安装成功

检查进程是否存在
$ ps -fC kurento-media-server
UID        PID  PPID  C STIME TTY          TIME CMD
kurento  17799     1  0 17:45 ?        00:00:00 /usr/bin/kurento-media-server

检查websocket RPC端口是否存在
$sudo netstat -tupln | grep -e kurento -e 8888
tcp6       0      0 :::8888                 :::*                    LISTEN      17799/kurento-media
测试websocket rpc链接
$curl -i -N -H "Connection: Upgrade" -H "Upgrade: websocket" -H "Host: 127.0.0.1:8888" -H "Origin: 127.0.0.1" http://127.0.0.1:8888/kurento
返回结果
HTTP/1.1 500 Internal Server Error
Server: WebSocket++/0.7.0

NOTE: 此测试命令在sudo 命令下执行

2.2.4  测试

安装完成,测试网址

默认用户名:OPENVIDUAPP

密码填入:MY_SECRET(之前.env选中的值)

访问 OpenVidu Call 应用

        完成所有组件部署后,可通过 https://IP 来访问 OpenVidu Call 应用,登录用户名 admin,密码为上面启动 docker 容器传入的 OPENVIDU_SECRET 环境变量的值 —— MY_SECRET

参考:

OpenVidu 的搭建 - 简书

用轻量服务器搭建自托管的视频会议服务,并集成到自己的项目中 - 掘金

OpenVidu —— 可在内网环境使用的开源 WebRTC 视频会议平台 - Alpha Hinex's Blog

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/691021.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

软件测试技能,JMeter压力测试教程,批量注册测试账号(计数器的使用)(十二)

一、前言 当我们jmeter压测的时候&#xff0c;需要准备一批测试账号&#xff0c;可以先批量注册一些用户&#xff0c;这些用户名称按固定格式 注册的用户不能重复并且需要自增&#xff0c;那么可以使用计数器来实现 二、添加注册请求 我想批量注册100个账号&#xff0c;账号…

【uniapp微信小程序footer】不满一屏固定显示在底部,超出一屏随页面滚动

<template><view class"wrapper"><view class"main">...</view><view class"footer">xx智慧农场</view></view > </template> <style>page {height: 100%;}.wrapper {height: 100%;}.ma…

高德地图的使用

JS API 结合 Vue 使用 高德地图 jsapi 下载、引入 npm add amap/amap-jsapi-loaderimport AMapLoader from amap/amap-jsapi-loader 使用2.0版本的loader需要在window对象下先配置 securityJsCode JS API 安全密钥使用 JS API 使用 script 标签同步加载增加代理服务器设置…

不定长(可变) 位置参数 *args和关键字参数 **kwargs 详解

位置参数&#xff1a; 传参时前面不带 "变量名", 顺序不可变, 按顺序赋给相应的局部变量def test(one,two,three):print(one - two * three)test(1,2,3) def test(one,two,three):print(one - two * three)test(3,2,1) 注意位置参数&#xff0c;需要注意 1 、 不…

STM32外设系列—BH1750

文章目录 一、BH1750简介二、BH1750原理图三、BH1750数据手册3.1 指令集3.2 IIC通信读/写 四、BH1750程序设计4.1 IIC程序4.2 BH1750初始化程序4.3 读取BH1750测量结果4.4 获取光照强度4.5 相关宏定义 五、应用实例六、拓展应用6.1 实时调节LED亮度6.2 实时调整颜色阈值 一、BH…

【Flutter】 Flutter 状态管理 BLoC 简明使用指南

文章目录 一、前言二、Flutter BLoC 的安装和配置三、Flutter BLoC 的基本使用四、Flutter BLoC 的简单示例五、总结 一、前言 &#x1f389;想要精通 Flutter&#xff0c;掌握更多技巧和最佳实践&#xff1f;好消息来了&#xff01;&#x1f449; Flutter专栏->Flutter De…

波动率预言机:开启新的DeFi风险管理策略和衍生市场

Chainlink 喂价一直是 DeFi 生态系统的基础构建块&#xff0c;为越来越多的加密货币、大宗商品和法定货币提供准确、防篡改和聚合的价格参考数据。高质量的价格数据的可用性在 DeFi 的增长过程中起到了重要作用&#xff0c;使其总锁定资产价值在高峰期达到了 1700 亿美元&#…

基于云计算技术B/S架构的医院信息管理系统源码(HIS)

云HIS系统源码&#xff0c;采用云端SaaS服务的方式提供 基于云计算技术的B/S架构的云HIS系统&#xff0c;采用云端SaaS服务的方式提供&#xff0c;使用用户通过浏览器即能访问&#xff0c;无需关注系统的部署、维护、升级等问题&#xff0c;系统充分考虑了模板化、配置化、智能…

MySQL基础之概述

MySQL 启动、终止 //以管理员身份运行cmd net start mysql80 net stop mysql80客户端连接 客户端cmd “开始”找到MySQL 环境变量普通cmd mysql [-h 127.0.0.1] [-P 3306] -u root -p mysql -u root -p[ ] 内的参数可省略&#xff0c;若连接本地MySQL&#xff0c;则无需指定…

机器学习笔记 - 结合深度学习的基于内容的图像实例检索 利用现成的DCNN模型进行检索

一、简述 上一篇,基于内容的图像实例检索综述。 https://mp.csdn.net/mp_blog/creation/editor/131415155https://mp.csdn.net/mp_blog/creation/editor/131415155 一种方案是,为分类任务而进行大规模训练的DCNN直接充当图像检索任务的现成特征检测器,也就是说,可以…

Live800:为什么越来越多的企业选择在线客服系统?

现今&#xff0c;越来越多的企业开始使用在线客服系统&#xff0c;这是因为互联网时代已经席卷全球&#xff0c;企业需要尽可能地利用新技术&#xff0c;优化客户体验和服务。一个强大的在线客服系统可以帮助企业实现客服信息的统一管理&#xff0c;这样可以为企业带来巨大的好…

Vue Router 相关理解 基本路由 多级路由

6.1.相关理解 6.1.1.vue-router 的理解 vue的一个插件库&#xff0c;专门用来实现SPA应用 6.1.2.对SPA应用的理解 单页Web应用&#xff08;single page web application&#xff0c;SPA&#xff09;整个应用只有一个完整的页面点击页面中的导航链接不会刷新页面&#xff0c…

Find My资讯|苹果Find My技术应用于车内丢失设备

美国专利商标局正式授予苹果两项泰坦项目新专利&#xff0c;分别是扩展其针对车内丢失设备的“Find My”设备服务&#xff0c;以及用于自动驾驶汽车的高级传感器系统&#xff0c;其中传感器系统还涵盖了带有摄像头系统的车辆&#xff0c;而摄像头系统除可3D重建场景之外&#x…

通过网络流量监测分析解决堡垒主机部署后未经授权访问的3389端口问题

1. 前言 堡垒主机是网络安全的重要组成部分&#xff0c;但在部署后仍可能存在一些主机可以绕过堡垒主机直接访问之前的3389端口。本文将介绍如何利用网络流量监测分析方法解决这个问题&#xff0c;提供一种有效的解决方案&#xff0c;加强对网络的访问控制和安全监测。 2. 网…

[NOI2016] 网格

题目描述 跳蚤国王和蛐蛐国王在玩一个游戏。 他们在一个 &#xfffd;n 行 &#xfffd;m 列的网格上排兵布阵。其中的 &#xfffd;c 个格子中 (0≤&#xfffd;≤&#xfffd;⋅&#xfffd;)(0≤c≤n⋅m)&#xff0c;每个格子有一只蛐蛐&#xff0c;其余的格子中&#xff…

小红书美妆品牌投放流程有哪些,品牌规划

越来越多的品牌开始重视新媒体&#xff0c;很多品牌和商家纷纷将目光瞄准了小红书&#xff0c;但是由于各平台都有自己的规则&#xff0c;盲目踏入不熟悉的领域肯定是有点冒险的。那么小红书美妆品牌投放流程有哪些&#xff0c;以及品牌规划。 小红书品牌投放指南是指小红书平台…

享元模式(Flyweight)

别名 缓存&#xff08;Cache&#xff09;。 定义 享元是一种结构型设计模式&#xff0c;它摒弃了在每个对象中保存所有数据的方式 &#xff0c;通过共享多个对象所共有的相同状态&#xff0c;让你能在有限的内存容量中载入更多对象。 前言 1. 问题 假如你希望在长时间工作…

互联网+洗鞋店软件多门店多网点预约下单小程序

互联网洗鞋店软件小程序功能介绍: 1.用户端&#xff08;上门取件、送货到店、寄存网点&#xff09; 2.取货员端&#xff08;取件员拍照&#xff0c;清洗过程&#xff0c;包装拍照&#xff09; 3.多门店管理&#xff08;用户进入小程序&#xff0c;根据定位自动匹配就近门店&…

Golang每日一练(leetDay0106) 超级丑数、右侧小于当前元素的个数

目录 313. 超级丑数 Super Ugly Number &#x1f31f;&#x1f31f; 315. 计算右侧小于当前元素的个数 Count-of-smaller-numbers-after-self &#x1f31f;&#x1f31f;&#x1f31f; &#x1f31f; 每日一练刷题专栏 &#x1f31f; Rust每日一练 专栏 Golang每日一练…

easypoi 导出word并插入echart图片和文件

一 pom 文件引入&#xff1a;<!-- 目前的版本对应 poi 4.1.2 和 xmlbeans 3.1.0 , poi 3.17 和 xmlbeans 2.6.0 --><dependency><groupId>org.apache.poi</groupId><artifactId>poi</artifactId><version>4.1.2</version&…