webrtc gateway janus系列(1) 環(huán)境部署

最近因工作需求需要研究webrtc技術(shù), 遍尋一下, 最后確定使用janus。以后會記錄janus方面學(xué)習(xí)的東東。

想要了解一個框架, 第一步就是要看其運行過程,再之后才是詳細(xì)細(xì)節(jié)方面的研究。

janus地址:

https://github.com/meetecho/janus-gateway

官網(wǎng)地址:

https://janus.conf.meetecho.com/

再測試的環(huán)境為ubuntu 14.04版本。

第一步, 先安裝依賴環(huán)境

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

不建議以上的方式, 會產(chǎn)生一些問題比如 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

**安裝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" ..

**安裝libnice**

make && sudo make install

git clone https://gitlab.freedesktop.org/libnice/libnice

cd libnice

./autogen.sh

./configure --prefix=/usr

make && sudo make install

**安裝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

./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

aptitude install doxygen

aptitude install graphviz

**第二步編譯安裝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/

(實際應(yīng)用的)

(若有的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

這樣就部署好了

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容