On Ubuntu 14.04/Mint 17.1
sudo apt-get install libmicrohttpd-dev libjansson-dev libnice-dev \ libssl-dev libsrtp-dev libsofia-sip-ua-dev libglib2.0-dev \ libopus-dev libogg-dev libini-config-dev libcollection-dev \ pkg-config gengetopt automake libtool doxygen graphviz git cmake
To allow for post-processing tools:
sudo apt-get install libavformat-dev
Fetch code:
git clone git://github.com/meetecho/janus-gateway.git
Then:
cd janus-gateway
If you want to use data channels:
sudo apt-get install subversion svn co http://sctp-refimpl.googlecode.com/svn/trunk/KERN/usrsctp usrsctp cd usrsctp ./bootstrap ./configure --prefix=/usr && make && sudo make install cd ..
If you want to use websockets (libwebsockets):
# obs cmake needed. to install: sudo apt-get install cmake git clone git://git.libwebsockets.org/libwebsockets cd libwebsockets mkdir build cd build cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .. make && sudo make install cd ../..
Then prepare for install janus:
sh autogen.sh ./configure --disable-rabbitmq --disable-data-channels --enable-post-processing # to use websockets #./configure --disable-websockets --disable-rabbitmq # to allow simple chat #./configure --disable-websockets --disable-data-channels --disable-rabbitmq
If you switch between used protocols requiring different libs, force a recompilation by a later make:
make clean
and then:
make sudo make install sudo make configs /usr/local/bin/janus
echo "Start installing libwebsockets"
cd ~/build
git clone git://git.libwebsockets.org/libwebsockets
cd libwebsockets
git checkout v2.0-stable
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DLWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT=ON ..
make && sudo make install
echo "Installing boring ssl"
cd ~/build
git clone https://boringssl.googlesource.com/boringssl
cd boringssl
sed -i s/" -Werror"//g CMakeLists.txt
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/
echo "Start installing Janus"
cd ~/build
git clone git://github.com/meetecho/janus-gateway.git
cd janus-gateway
sh autogen.sh
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/boringssl/lib
./configure --enable-boringssl --disable-data-channels --disable-rabbitmq --disable-mqtt --disable-docs --prefix=/opt/janus LDFLAGS="-L/usr/local/lib -Wl,-rpath=/usr/local/lib" CFLAGS="-I/usr/local/include"
make && sudo make install
sudo make configs
hi @jaychsu line 125 `
git clone git://git.libwebsockets.org/libwebsockets package gives error.
If the address is changed to `
` set up seamless.