• WebRTC janus安装编译教程


    janus编译

    系统 ubuntu 22.04

    1.更新系统

    apt-get update -y
    
    • 1

    2.安装依赖

    apt install libmicrohttpd-dev libjansson-dev \
    	libssl-dev libsofia-sip-ua-dev libglib2.0-dev \
    	libopus-dev libogg-dev libcurl4-openssl-dev liblua5.3-dev \
    	libconfig-dev pkg-config libtool automake cmake git wget -y	
    apt-get install -y \
    		libavutil-dev \
    		libavformat-dev \
    		libavcodec-dev \
    		libmicrohttpd-dev \
    		libjansson-dev \
    		libssl-dev \
    		libsofia-sip-ua-dev \
    		libglib2.0-dev \
    		libopus-dev \
    		libogg-dev \
    		libcurl4-openssl-dev \
    		liblua5.3-dev \
    		libconfig-dev \
    		libusrsctp-dev \
    		libwebsockets-dev \
    		libnanomsg-dev \
    		librabbitmq-dev \
    		pkg-config \
    		gengetopt \
    		libtool \
    		automake \
    		build-essential \
    		wget \
    		git \
    		gtk-doc-tools
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30

    3.安装Meson and Ninja

    apt install meson ninja-build -y
    
    • 1

    4.设置python优先级

    update-alternatives --install /usr/bin/python python /usr/bin/python3 1
    
    • 1

    5.安装libnice

    git clone https://gitlab.freedesktop.org/libnice/libnice
    cd libnice
    meson --prefix=/usr build && ninja -C build && ninja -C build install
    
    export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig
    
    
    Installing stun/tools/stund to /usr/bin
    Installing stun/tools/stunbdc to /usr/bin
    Installing nice/libnice.so.10.13.1 to /usr/lib/x86_64-linux-gnu
    Installing symlink pointing to libnice.so.10.13.1 to /usr/lib/x86_64-linux-gnu/libnice.so.10
    Installing symlink pointing to libnice.so.10 to /usr/lib/x86_64-linux-gnu/libnice.so
    Installing /libnice/agent/address.h to /usr/include/nice
    Installing /libnice/agent/agent.h to /usr/include/nice
    Installing /libnice/agent/candidate.h to /usr/include/nice
    Installing /libnice/agent/debug.h to /usr/include/nice
    Installing /libnice/agent/interfaces.h to /usr/include/nice
    Installing /libnice/agent/pseudotcp.h to /usr/include/nice
    Installing /libnice/stun/stunagent.h to /usr/include/stun
    Installing /libnice/stun/stunmessage.h to /usr/include/stun
    Installing /libnice/stun/win32_common.h to /usr/include/stun
    Installing /libnice/stun/debug.h to /usr/include/stun
    Installing /libnice/stun/constants.h to /usr/include/stun
    Installing /libnice/stun/usages/bind.h to /usr/include/stun/usages
    Installing /libnice/stun/usages/ice.h to /usr/include/stun/usages
    Installing /libnice/stun/usages/turn.h to /usr/include/stun/usages
    Installing /libnice/stun/usages/timer.h to /usr/include/stun/usages
    Installing /libnice/nice/nice.h to /usr/include/nice
    Installing /libnice/build/nice-version.h to /usr/include/nice
    Installing /libnice/build/meson-private/nice.pc to /usr/lib/x86_64-linux-gnu/pkgconfig
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30

    6.安装libsrtp

    wget https://github.com/cisco/libsrtp/archive/v2.2.0.tar.gz
    tar xfv v2.2.0.tar.gz
    cd libsrtp-2.2.0
    ./configure --prefix=/usr --enable-openssl
    make shared_library && make install
    
    /usr/bin/install -c -d /usr/include/srtp2
    /usr/bin/install -c -d /usr/lib
    cp ./include/srtp.h /usr/include/srtp2
    cp ./crypto/include/cipher.h /usr/include/srtp2
    cp ./crypto/include/auth.h /usr/include/srtp2
    cp ./crypto/include/crypto_types.h /usr/include/srtp2
    if [ -f libsrtp2.a ]; then cp libsrtp2.a /usr/lib/; fi
    if [ -f libsrtp2.dll.a ]; then cp libsrtp2.dll.a /usr/lib/; fi
    if [ -f libsrtp2.so.1 ]; then \
            /usr/bin/install -c -d /usr/lib; \
            cp libsrtp2.so.1 /usr/lib/; \
            cp libsrtp2.so /usr/lib/; \
            if [ -n "1" ]; then \
                    ln -sfn libsrtp2.so.1 /usr/lib/libsrtp2.so; \
            fi; \
    fi
    /usr/bin/install -c -d /usr/lib/pkgconfig
    cp ./libsrtp2.pc /usr/lib/pkgconfig/
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24

    7.安装usrsctp

    git clone https://github.com/sctplab/usrsctp
    cd usrsctp
    ./bootstrap
    ./configure --prefix=/usr --disable-programs --disable-inet --disable-inet6
    make && make install
    
    • 1
    • 2
    • 3
    • 4
    • 5

    8.安装libwebsockets

    git clone https://github.com/warmcat/libwebsockets.git
    cd libwebsockets
    git checkout v4.3-stable
    mkdir build
    cd build
    cmake -DLWS_MAX_SMP=1 -DLWS_WITHOUT_EXTENSIONS=0 -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_C_FLAGS="-fpic" ..
    make && make install
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7

    9.安装mqtt

    git clone https://github.com/eclipse/paho.mqtt.c.git
    cd paho.mqtt.c
    make && make install
    
    • 1
    • 2
    • 3

    10.安装libnanomsg-dev

    apt-get install aptitude -y
    aptitude install libnanomsg-dev -y
    
    • 1
    • 2

    11.安装rabbitmq-c

    git clone https://github.com/alanxz/rabbitmq-c
    cd rabbitmq-c
    git submodule init
    git submodule update
    mkdir build && cd build
    cmake -DCMAKE_INSTALL_PREFIX=/usr ..
    make && make install
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7

    12.安装janus

    git clone https://github.com/meetecho/janus-gateway.git
    cd janus-gateway
    sh autogen.sh
    ./configure --enable-post-processing --prefix=/usr/local && \
    	make && \
    	make install && \
    	make configs
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7

    13.安装完成后,直接执行janus运行程序

  • 相关阅读:
    Arrays.asList
    小程序页面结构
    python + urllib + BeautifulSoup 获取百度首页标题
    【C++】:类和对象(2)
    manimgl入门
    Ubuntu22.04安装Cuda11.3和Cudnn8.5的深度学习GPU环境
    【JavaSE】文件与IO流
    PyTorch源码学习系列 - 1.初识
    pat 1009 说反话
    项目部署到Linux
  • 原文地址:https://blog.csdn.net/qq_21816375/article/details/133889239