当前位置: 首页 > article >正文

LiveKit 在Kylin Server V10 下离线安装和配置

        LiveKit 是一个基于 WebRTC 的端到端堆栈,提供了 SFU 媒体服务器和 SDK。旨在为开发人员提供可扩展的、多用户会议功能,包括实时视频、音频和数据。

一、查看操作系统信息

[root@localhost ~]# cat /etc/.kyinfo
[dist]
name=Kylin
milestone=Server-V10-GFB-Release-ZF9_01-2204-Build03
arch=arm64
beta=False
time=2023-01-09 11:04:36
dist_id=Kylin-Server-V10-GFB-Release-ZF9_01-2204-Build03-arm64-2023-01-09 11:04:36

[servicekey]
key=0080176

[os]
to=
term=2024-05-16
 

二、安装 Go 语言环境

1. 下载软件包
[root@localhost ~]# wget https://golang.google.cn/dl/go1.23.2.linux-arm64.tar.gz
2. 解压源码包
[root@localhost ~]# tar -zxvf go1.23.2.linux-arm64.tar.gz -C /usr/local
3. 设置环境变量
[root@localhost ~]# cd /etc/profile.d/
[root@localhost profile.d]# vi golang.sh
export GOROOT=/usr/local/go
export GOBIN=/usr/local/go/bin
export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
4. 手动加载配置文件 
[root@localhost ~]# source /etc/profile.d/golang.sh 
5. 查看是否安装成功 
[root@localhost ~]# go version
go version go1.23.2 linux/arm64

三、离线安装LiveKit-Server

1. 下载源码
[root@localhost ~]# git clone https://github.com/livekit/livekit
正克隆到 'livekit'...
remote: Enumerating objects: 28477, done.
remote: Counting objects: 100% (453/453), done.
remote: Compressing objects: 100% (201/201), done.
remote: Total 28477 (delta 318), reused 364 (delta 251), pack-reused 28024 (from 1)
接收对象中: 100% (28477/28477), 10.59 MiB | 3.29 MiB/s, 完成.
处理 delta 中: 100% (21911/21911), 完成.
2.  查看下载后的文件
[root@localhost ~]# cd livekit/
[root@localhost livekit]# ls
bootstrap.sh  config-sample.yaml  go.mod              LICENSE           magefile_windows.go  README.md      tools
CHANGELOG     deploy              go.sum              magefile.go       NOTICE               renovate.json  version
cmd           Dockerfile          install-livekit.sh  magefile_unix.go  pkg                  test
3. 查看bootstrap.sh文件
[root@localhost livekit]# cat bootstrap.sh 
#!/usr/bin/env bash
# Copyright 2023 LiveKit, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


if ! command -v mage &> /dev/null
then
  pushd /tmp
  git clone https://github.com/magefile/mage
  cd mage
  go run bootstrap.go
  rm -rf /tmp/mage
  popd
fi

if ! command -v mage &> /dev/null
then
  echo "Ensure `go env GOPATH`/bin is in your \$PATH"
  exit 1
fi

go mod download
4. 执行 bootstrap.sh 文件 
[root@localhost livekit]# ./bootstrap.sh 

如果出现下列错误:

/tmp ~/livekit
正克隆到 'mage'...
remote: Enumerating objects: 2481, done.
remote: Counting objects: 100% (477/477), done.
remote: Compressing objects: 100% (196/196), done.
remote: Total 2481 (delta 327), reused 342 (delta 263), pack-reused 2004 (from 1)
接收对象中: 100% (2481/2481), 7.92 MiB | 4.68 MiB/s, 完成.
处理 delta 中: 100% (1249/1249), 完成.
Running target: Install
exec: go "env" "GOBIN"
exec: go "env" "GOPATH"
exec: git "rev-parse" "--short" "HEAD"
exec: git "describe" "--tags"
exec: go "build" "-o" "/root/go/bin/mage" "-ldflags=-X \"github.com/magefile/mage/mage.timestamp=2024-10-18T14:26:16+08:00\"ub.com/magefile/mage/mage.commitHash=2385abb\" -X \"github.com/magefile/mage/mage.gitTag=v1.15.0-5-g2385abb\"" "github.com/mge"
~/livekit
go: buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go@v1.33.0-20240401165935-b983156c5e99.1: Get "https://proxy.golf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/@v/v1.33.0-20240401165935-b983156c5e99.1.mod": dial tcp 142.250.217i/o timeout

则执行以下步骤

(1)设置 GOPROXY

[root@localhost ~]# go env -w GOPROXY=https://goproxy.cn,direct

 (2)查看是否设置成功

[root@localhost ~]# go env
GO111MODULE=''
GOARCH='arm64'
GOBIN='/usr/local/go/bin'
GOCACHE='/root/.cache/go-build'
GOENV='/root/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/root/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/root/go'
GOPRIVATE=''
GOPROXY='https://goproxy.cn,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/linux_arm64'
GOVCS=''
GOVERSION='go1.23.2'
GODEBUG=''
GOTELEMETRY='local'
GOTELEMETRYDIR='/root/.config/go/telemetry'
GCCGO='gccgo'
GOARM64='v8.0'
AR='ar'
CC='gcc'
CXX='g++&#

http://www.kler.cn/news/357848.html

相关文章:

  • DataWhale10月动手实践——Bot应用开发task02学习笔记
  • 基于基于jsp+mysql+Spring+mybatis的SSM汽车保险理赔管理系统设计和实现
  • bash之基本运算符
  • 【大模型问答测试】大模型问答测试脚本实现(第二版)——接入pytest与代码解耦
  • nginx代理配置,搞定proxy_pass配置
  • 选择、冒泡和插入排序及其优化版本课件
  • AI 3D拣选系统行业分析:物流行业是最主要的需求来源
  • github学生认证(白嫖copilot)-Why are you not on campus?不在校园内
  • 考研前所学c语言02(2024/10/16)
  • Lazarus Query转EXCEL功能
  • 网络编程(21)——通过beast库快速实现http服务器
  • vite详解及代码案例
  • 阿里云盘企业版收费标准,不同人数、存储空间版本是有区别的
  • 什么是堡垒机 ?安全为什么需要堡垒 ?
  • 未来汽车究竟该是什么样子?
  • ESP32-C3实现定时器的启停(Arduino IDE)
  • Redis提供了专门的命令来实现自增操作
  • PyQt5入门级超详细教程中篇
  • 如何实现采购数字化?
  • Elasticsearch基本使用及介绍