Skip to content

Instantly share code, notes, and snippets.

@nullicorn
Created June 20, 2020 14:10
Show Gist options
  • Save nullicorn/9b8da12128ac043d1c87082da997f159 to your computer and use it in GitHub Desktop.
Save nullicorn/9b8da12128ac043d1c87082da997f159 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Instruction: https://github.com/meetecho/janus-gateway/blob/master/README.md
# Host: Ubuntu 18.04.3 (LTS) x64
# Run: /opt/janus/bin/janus
# Prepare: apt full-upgrade -y && sudo reboot now
sudo add-apt-repository universe
apt install -y libmicrohttpd-dev libjansson-dev \
libssl-dev libsrtp-dev libsofia-sip-ua-dev libglib2.0-dev \
libopus-dev libogg-dev libcurl4-openssl-dev liblua5.3-dev \
libconfig-dev pkg-config gengetopt libtool automake \
cmake python3-pip git
apt remove -y libsrtp* libnice*
apt autoremove -y
pip3 install meson ninja
cd ~
git clone https://gitlab.freedesktop.org/libnice/libnice
cd libnice
meson --prefix=/usr build && ninja -C build && sudo ninja -C build install
cd ~
wget https://github.com/cisco/libsrtp/archive/v2.2.0.tar.gz
tar xfv v2.2.0.tar.gz
cd libsrtp-2.2.0
./configure --prefix=/usr --enable-openssl # --libdir=/usr/lib64
make shared_library && sudo make install
cd ~
git clone https://libwebsockets.org/repo/libwebsockets
cd libwebsockets
git checkout v3.2-stable
mkdir build
cd build
cmake -DLWS_MAX_SMP=1 -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_C_FLAGS="-fpic" ..
make && sudo make install
cd ~
git clone https://github.com/meetecho/janus-gateway.git
cd janus-gateway
sh autogen.sh
./configure --prefix=/opt/janus
make
make install
make configs
cd ~
rm -rf janus-gateway libnice libsrtp-2.2.0 libwebsockets v2.2.0.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment