Ubuntu视频会议Janus部署

纯手打,只是记录本人部署Janus时的步骤,不同环境可能会有差异,仅供参考

1.$echo export LC_ALL='en_US.UTF-8' >> ~/.bashrc

2.$apt update && $apt install git -y && $apt install aptitude -y

3.设置python3版本

3.0.查看当前Python版本 $ls /usr/bin/python*

3.1.查看当前Python默认版本 $python --version

3.2修改Python默认版本 $echo alias python=python3 >> ~/.bashrc && $source ~/.bashrc 

4.安装meson $wget https://github.com/mesonbuild/meson/archive/0.53.1.tar.gz && tar -zxvf 0.53.1.tar.gz

4.1安装pip3 $apt install python3-pip -y 

4.2安装ninja $apt install ninja-build -y

4.3通过Python3安装meson $python3 setup.py install 安装成功后台提示


install meson success


4.4 设置 pkgconfig 路径 $echo export PKG_CONFIG_PATH=/usr/local/bin:$PKG_CONFIG_PATH; (/usr/local/bin 为meson所在路径)

5.安装glib依赖 libffi $wget https://github.com/libffi/libffi/releases/download/v3.3/libffi-3.3.tar.gz && $cd libffi-3.3/ && $./configure && $make && $make install

6.安装glib依赖zlib $wget https://www.zlib.net/zlib-1.2.11.tar.gz 

$cd zlib-x.x && $./configure && $make && $make install

7.安装pkgconfig $wget https://pkg-config.freedesktop.org/releases/pkg-config-0.29.2.tar.gz

$cd pkg-config-0.29.2/ && $./configure --with-internal-glib && $make && $make install ;(configure: error: Either a previously installed pkg-config or "glib-2.0 >= 2.16" could not be found. Please set GLIB_CFLAGS and GLIB_LIBS to the correct values 【or pass --with-internal-glib】 to configure to use the bundled copy.)

8.安装pcre wget https://sourceforge.net/projects/pcre/files/pcre2/10.34/pcre2-10.34.tar.gz

$cd pcre2-10.34/ && $./configure && $make && $make install

9.安装glib $wget https://github.com/GNOME/glib/archive/2.63.4.tar.gz && $cd glib-2.63.4/

$meson _build (如果出现‘mount’not found 如下图)


mount not found

输入 $find / -name mount.pc 查看路径 并设置 pkgconfig path(如图)


find mount.pc

继续执行 $meson _build && $ninja -C _build && $ninja -C _build install ; glib 安装成功后 配置pkgconfig path

9.1 $find / -name glib-2.0.pc (如下图)


example

10. 根据Janus官方文档 

aptitude install libmicrohttpd-dev libjansson-dev \

libssl-dev libsrtp-dev libsofia-sip-ua-dev libglib2.0-dev \

libopus-dev libogg-dev libcurl4-openssl-dev liblua5.3-dev \

libconfig-dev pkg-config gengetopt libtool automake

11.安装libnice $wget https://github.com/libnice/libnice/archive/0.1.16.tar.gz

$cd libnice-0.1.16 / 执行 $sh autogen.sh (如果出现【autogen.sh: 26: autogen.sh: gtkdocize: not found】需要 $apt install gtk-doc-tools -y);(如果出现【configure: error: Neither GnuTLS or OpenSSL is available】$apt install libssl-dev -y),没有问题后执行 $./configure && $make && $make install

12. (如果后期需要编译安装Janus的Event Handler插件)$apt install libcurl4-openssl-dev -y 

13.安装libsrtp $wget https://github.com/cisco/libsrtp/archive/v2.2.0.tar.gz

$cd libsrtp-2.2.0

$./configure --prefix=/usr --enable-openssl

$make shared_library && $make install

14.安装 usrcstp $git clone https://github.com/sctplab/c

$cd usrsctp

$./bootstrap

$./configure --prefix=/usr && make &&  $make install

14.安装libwebsockets库 $git clone https://libwebsockets.org/repo/libwebsockets && $cd libwebsockets && $mkdir build && $ cd build

$cmake -DLWS_MAX_SMP=1 -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_C_FLAGS="-fpic" ..

$make &&  $make install

15.如果需要编译Janus文档 $aptitude install doxygen graphviz

16.在安装完所有依赖后 下载Janus源码 

$git clone https://github.com/meetecho/janus-gateway.git && $cd janus-gateway

执行 $sh autogen.sh 命令生成configure文件

$./configure --prefix=/opt/janus 

$make && $make install 

编译完成之后,使用$make configs命令生成默认配置文件,配置文件位于/opt/janus/etc/janus/janus.jcfg,注意:每次执行$make configs命令都会将/opt/janus/etc/janus/janus.jcfg文件还原为默认配置,

到目前为止 已经能启动Janus服务:$/opt/janus/bin/janus

$vi ~/.bashrc (查看配置的路径如下图)


.bashrc

后续部署客户机及https

...

你可能感兴趣的:(Ubuntu视频会议Janus部署)