webrtc gateway janus系列(1) 环境部署

最近因工作需求需要研究webrtc技术, 遍寻一下, 最后确定使用janus。以后会记录janus方面学习的东东。
想要了解一个框架, 第一步就是要看其运行过程,再之后才是详细细节方面的研究。

janus地址:
https://github.com/meetecho/janus-gateway
官网地址:
https://janus.conf.meetecho.com/

再测试的环境为ubuntu 14.04版本。

第一步, 先安装依赖环境
ubuntu 使用aptitude 来安装
apt-get install aptitude
//aptitude install libmicrohttpd-dev libjansson-dev libnice-dev
//aptitude install libssl-dev libsrtp-dev libsofia-sip-ua-dev libglib2.0-dev
不建议以上的方式, 会产生一些问题比如 Current status: 751 updates [-1].

aptitude -y install libmicrohttpd-dev
aptitude -y install libjansson-dev
#aptitude -y install libnice-dev
aptitude -y install libssl-dev
aptitude -y install libsrtp-dev
aptitude -y install libsofia-sip-ua-dev
aptitude -y install libglib2.0-dev
aptitude -y install libopus-dev
aptitude -y install libogg-dev
aptitude -y install libcurl4-openssl-dev
aptitude -y install liblua5.3-dev
aptitude -y install pkg-config
aptitude -y install gengetopt
aptitude -y install libtool
aptitude -y install automake
apt-get -y install cmake
aptitude -y install doxygen
aptitude -y install graphviz
aptitude -y install libconfig-dev
安装libsockets
git clone https://github.com/warmcat/libwebsockets.git
cd libwebsockets/
git checkout v2.4-stable
mkdir build
cd build
cmake -DLWS_MAX_SMP=1 -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_C_FLAGS="-fpic" …
make && sudo make install
安装libnice
git clone https://gitlab.freedesktop.org/libnice/libnice
cd libnice
./autogen.sh
./configure --prefix=/usr
make && sudo make install
说明 安装时如果出现 ./autogen.sh: gtkdocize: not found
解决方法
apt-get install gtk-doc-tools
安装usrsctp Datachannel
git clone https://github.com/sctplab/usrsctp
cd usrsctp
./bootstrap
./configure --prefix=/usr
make && sudo make install

安装 libSRTP
git clone https://github.com/cisco/libsrtp.git
cd libsrtp/
./configure --prefix=/usr
make && make install
安装 Eclipse Paho MQTT C client library
git clone https://github.com/eclipse/paho.mqtt.c.git
cd paho.mqtt.c/
mkdir build
cd build/
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_C_FLAGS="-fpic" …
make && make install

安装rabbitmq
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 && sudo make install

第二步编译安装janus
git clone https://github.com/meetecho/janus-gateway.git
cd janus-gateway
sh autogen.sh
./configure --prefix=/opt/janus --enable-docs
(最全的)
./configure --prefix=/opt/janus --enable-websockets --enable-docs --libdir=/usr/lib/x86_64-linux-gnu --disable-mqtt PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
(实际应用的)
(若有的lib找不到自定义路径可以加 PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/ --libdir=/usr/lib64 )
【因mqtt有问题,所以取消到, 编译出
x86_64-linux-gnu/libpaho-mqtt3c.so.1.3.0
libpaho-mqtt3c.so.1
libpaho-mqtt3c.so
libpaho-mqtt3a.so.1.3.0
libpaho-mqtt3a.so.1
libpaho-mqtt3a.so
但需要-lpaho-mqtt3as
解决:
进入makefile
将-lpaho-mqtt3as 改成-lpaho-mqtt3a

make && make install

这样就部署好了

你可能感兴趣的:(webrtc)