Last active
August 21, 2020 16:15
-
-
Save pwrstudio/dae9e81d293c60e12fc32a17add961ee to your computer and use it in GitHub Desktop.
Janus-gateway installation on Ubuntu 18.4 AWS instance (Lightsail)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Janus-gateway installation on Ubuntu 18.4 AWS instance (2020/08/21) | |
HTTP only, no data channels | |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |
** FIX MISSING LOCALE | |
LC_ALL="en_US.UTF-8" # <= add this line to /etc/environment and reboot | |
- - - - - - | |
- - - - - - | |
** UPDATE & UPGRADE | |
sudo apt-get update && sudo apt-get upgrade | |
- - - - - - | |
- - - - - - | |
** INSTALL DEPENDENCIES | |
sudo apt-get install libmicrohttpd-dev libjansson-dev libssl-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 python3-pip python3-setuptools python3-wheel ninja-build | |
- - - - - - | |
- - - - - - | |
*** INSTALL MESON (needed to build libnice) | |
sudo pip3 install meson | |
- - - - - - | |
- - - - - - | |
*** INSTALL LIBNICE | |
git clone https://gitlab.freedesktop.org/libnice/libnice | |
cd libnice | |
meson --prefix=/usr build | |
ninja -C build | |
sudo ninja -C build install | |
- - - - - - | |
- - - - - - | |
*** INSTALL LIBSRTP | |
wget https://github.com/cisco/libsrtp/archive/v2.3.0.tar.gz | |
tar xfv v2.3.0.tar.gz | |
cd libsrtp-2.3.0 | |
./configure --prefix=/usr --enable-openssl | |
make shared_library | |
sudo make install | |
- - - - - - | |
- - - - - - | |
*** INSTALL JANUS | |
git clone https://github.com/meetecho/janus-gateway.git | |
cd janus-gateway | |
sh autogen.sh | |
./configure --prefix=/opt/janus --disable-websockets --disable-data-channels --disable-rabbitmq --disable-mqtt | |
make | |
sudo make install | |
sudo make configs | |
- - - - - - | |
- - - - - - | |
*** SET nat_1_1_mapping (!IMPORTANT!) | |
In "/opt/janus/etc/janus/janus.jcfg" set: | |
nat_1_1_mapping = "PUBLIC_IP_OF_AWS_INSTANCE" | |
- - - - - - | |
- - - - - - | |
*** SET UP REVERSE PROXY FOR HTTPS | |
# Change change nameservers for your domain to AWS's | |
# In Lightsail admin panel, create an A record pointing at instance | |
# Install nginx | |
sudo apt install nginx | |
# Edit nginx serverfile (eg. /etc/nginx/sites-available/default) | |
server { | |
listen 80; | |
server_name janus.mydomain.com; | |
location / { | |
proxy_pass http://localhost:8088/janus/; | |
} | |
} | |
# Get SSL Certificate via lets encrypt certbot | |
sudo add-apt-repository ppa:certbot/certbot | |
sudo apt install python-certbot-nginx | |
sudo certbot --nginx -d janus.mydomain.com | |
# Restart nginx | |
sudo systemctl reload nginx | |
- - - - - - | |
- - - - - - | |
*** RUN JANUS | |
/opt/janus/bin/janus | |
- - - - - - | |
- - - - - - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment