Janus Server 部署 -Ubuntu 16.04 --笔记

Ubuntu16.04 下 Janus Server

Janus 官网:https://janus.conf.meetecho.com/index.html

参考文档:https://github.com/meetecho/janus-gateway

安装步骤

   sudo apt-get update && sudo apt-get upgrade

  1. sudo apt-get install aptitude

  2. sudo apt-get install cmake

  3.sudo aptitude install libmicrohttpd-dev 

    sudo aptitude install libjansson-dev 

   sudo aptitude install  libnice-dev 

   sudo aptitude install  libssl-dev 

   sudo aptitude install  libsrtp-dev 

   sudo aptitude install  libsofia-sip-ua-dev 

   sudo aptitude install  libglib2.0-dev 

   sudo aptitude install  libopus-dev 

   sudo aptitude install  libogg-dev 

   sudo aptitude install  libcurl4-openssl-dev 

   sudo aptitude install  pkg-config 

   sudo aptitude install  gengetopt  

   sudo aptitude install  libtool 

   sudo aptitude install  automake

4.git clone https://github.com/warmcat/libwebsockets.git

  cd libwebsockets

  mkdir build

  cd build

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

  make && sudo make install

5.sudo apt-get install python-software-properties

   curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -

   sudo apt-get install nodejs

   sudo npm -g install http-server

6.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 && sudo make install

7.git clone https://github.com/meetecho/janus-gateway.git

注释:如果没有安装c运行环境需要安装 找度娘很多

cd janus-gateway

sh autogen.sh

./configure --prefix=/opt/janus --enable-websockets --enable-docs

make

sudo make install

make configs

8.测试启动启动

/opt/janus/bin/janus --debug-level=7 --log-file=$HOME/janus-log

9./lib/systemd/system

编写服务 janus.service

[Unit]

Description=Janus:Server

After=local-fs.target

After=remote-fs.target

After=network-online.target

Wants=network-online.target

Conflicts=shutdown.target

[Service]

Type=oneshot

RemainAfterExit=yes

ExecStart=/opt/janus/bin/janus

[Install]

WantedBy=multi-user.target

运行systemctl enable janus.service

启动systemctl start janus.service

你可能感兴趣的:(Janus Server 部署 -Ubuntu 16.04 --笔记)