centos7安装janus

1、yum install epel-release 安装epel-release包,更新yum的软件仓库。

2、yum update -y 更新仓库中软件包

3、yum install libmicrohttpd-devel jansson-devel openssl-devel libsrtp-devel sofia-sip-devel glib2-devel opus-devel libogg-devel libcurl-devel pkgconfig gengetopt libconfig-devel libtool autoconf automake

4、上述安装发现没有sofia-sip-devel只能采用源码安装 eg:git clone https://git.code.sf.net/p/sofia-sip/git sofia-sip-git

根据系统自带autmake版本修改autogen.sh,执行 sh autogen.sh


./configure 

make && make install

5、安装libnice     

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

需要依赖安装gtk  yum install gtk*

cd libnice

./autogen.sh

./configure --prefix=/usr

make && sudo make install

6、安装libsrtp库

wget https://github.com/cisco/libsrtp/archive/v1.5.4.tar.gz

tar xfv v1.5.4.tar.gz

cd libsrtp-1.5.4

./configure --prefix=/usr --enable-openssl --libdir=/usr/lib64

make shared_library && sudo make install

7、安装boringssl库

git clone https://boringssl.googlesource.com/boringssl.git

cd boringssl

# Don't barf on errors

sed -i s/" -Werror"//g CMakeLists.txt

# Build

mkdir -p build

cd build

cmake -DCMAKE_CXX_FLAGS="-lrt" ..

make

cd ..

# Install

sudo mkdir -p /opt/boringssl

sudo cp -R include /opt/boringssl/

sudo mkdir -p /opt/boringssl/lib

sudo cp build/ssl/libssl.a /opt/boringssl/lib/

sudo cp build/crypto/libcrypto.a /opt/boringssl/lib/

8、安装usrsctp

git clone https://github.com/sctplab/usrsctp

cd usrsctp

./bootstrap

./configure --prefix=/usr   --libdir=/usr/lib64 && make && sudo make install

9、安装libwebsockets

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

cd libwebsockets

# If you want the stable version of libwebsockets, uncomment the next line

# git checkout v2.4-stable

mkdir build

cd build

# See https://github.com/meetecho/janus-gateway/issues/732 re: LWS_MAX_SMP

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

make && sudo make install

10、安装paho.mqtt.c

git clone https://github.com/eclipse/paho.mqtt.c.git

cd paho.mqtt.c

make && sudo make install

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

12、yum install doxygen graphviz

13、下载/janus-gateway

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

cd janus-gateway

sh autogen.sh

export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig

./configure --prefix=/opt/janus

make

make install

安装默认配置文件make configs

如果想禁用一些功能 ./configure --disable-websockets --disable-data-channels --disable-rabbitmq --disable-mqtt

构建文档时使用此语句安装 ./configure --enable-docs

你可能感兴趣的:(centos7安装janus)