Find a whole network did not see documentation on installation 18.04 Janus, and hereby record, of course, the best is the official document compiled documentation directory in the Git official website of Janus README.md file. The main environmental record below what preparation process of the pit, some have avoided the pit, so directly posted after the solution mining pit.
Preparing the environment
-
Prerequisite packages installed base
sudo aptitude install libmicrohttpd-dev libjansson-dev libnice-dev libssl-dev libsrtp-dev libsofia-sip-ua-dev libglib2.0-dev libopus-dev libogg-dev libcurl4-openssl-dev pkg-config gengetopt libtool automake gtk-doc-tools autoconfig autogen gcc g++ libconfig++-dev doxygen graphviz
-
Installation libnice
git clone https://gitlab.freedesktop.org/libnice/libnice cd libnice ./autogen.sh ./configure --prefix=/usr make && sudo make install
-
Installation websocket
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
-
Installation Node
Do not use Ubuntu comes with software to download and install Node management, follow-up will go wrong, go Node official website to download
1. tar -xJf node-v11.10.1-linux-x64.tar.xz -C /opt //解压到opt目录下 2. sudo ln -s /opt/node-v11.10.1-linux-x64/bin/node /usr/local/bin/node //建立链接到 /usr/local/bin/ 目录 3. sudo ln -s /opt/node-v11.10.1-linux-x64/bin/npm /usr/local/bin/npm //npm建立执行链接 4. npm -v 5. node -v //可以查看具体信息
-
Http-server installation
sudo npm -g install http-server #这是一种最便捷的安装方式
-
Installation libsrtp
wget https://github.com/cisco/libsrtp/archive/v2.1.0.tar.gz tar xfv v2.1.0.tar.gz cd libsrtp-2.1.0 ./configure --prefix=/usr --enable-openssl make shared_library && sudo make install
Compile and install
-
Compile Janus
git clone https://github.com/meetecho/janus-gateway.git sh autogen.sh ./configure --prefix=/opt/janus --enable-websockets --enable-docs make sudo make install
Deployment Test
-
Janus deployment
- Enter / opt / janus / etc / janus / jcfg to remove sample files are copied to a suffix
-
Start http
Html directory into the source directory janus, execution
/opt/node-v11.10.1-linux-x64/bin/http-server 输入如下: Starting up http-server, serving ./ Available on: http://127.0.0.1:8080 http://172.16.34.129:8080 Hit CTRL-C to stop the server
-
Start Janus
/opt/janus/bin/janus --debug-level=7 --log-file=$HOME/janus-log
-
test
- Open your browser and enter http://172.16.34.129:8080/ actual input their own ip address, you can also use 127.0.0.1
- Select the Echo Test at Demos inside, you can see if success is to build their own audio and video output
Summary problem
-
Question one
提示“npm : Depends: node-gyp (>= 0.10.9) but it is not going to be installed”
Solution
This occurs must use a system of Node, follow the steps above to Node official website to download the correct version of the configuration can be installed, remember to uninstall before installing the system comes
sudo apt remove npm //卸载npm sudo apt remove node //卸载node cd /usr/local/bin //进入该目录中,若有node或者npm文件,将他删除删除
-
Question two
When compiling libsrtp appear "crypto / include / aes_gcm_ossl.h: 58: 20: error: field 'ctx' has incomplete type"
Solution
Download version 2.1 can solve the above step is to download the correct version.
-
Question three
Janus turned compile time if the option --enable-docs, suggesting "error: Doxygen 1.8.13 too new", the current solution is to remove this option.