Build (Rocky Linux 9)[edit]
dnf -y install jansson-devel libconfig-devel libmicrohttpd-devel meson ninja-build
dnf install libnice libnice-devel
dnf install libwebsockets libwebsockets-devel
dnf install usrsctp usrsctp-devel
libsrtp2 (SRTP: Secure Real-time Transport Protocol)[edit]
#git clone https://github.com/cisco/libsrtp.git # このままだと libsrtp3 がダウンロードされる
git clone --branch v2.5.0 --depth 1 https://github.com/cisco/libsrtp.git libsrtp
cd libsrtp
./configure --prefix=/usr/local --enable-openssl
make -j"$(nproc)"
make install
git clone https://github.com/meetecho/janus-gateway.git
cd janus-gateway
./autogen.sh
./configure --prefix=/usr/local --enable-rest --enable-websockets --enable-data-channels --disable-rabbitmq --disable-mqtt --disable-docs --enable-libsrtp2
make -j"$(nproc)"
make install
make configs
/usr/local/etc/janus/janus.jcfg[edit]
api_secret = "" # Janus REST API 用の認証キー
admin_secret = "" # Janus 管理用 API の認証キー
/usr/local/etc/janus/janus.transport.http.jcfg (デフォルト)[edit]
http = true
port = 8088 # for REST
/usr/local//etc/janus/janus.transport.websockets.jcfg (デフォルト)[edit]
ws = true
ws_port = 8188 # for Web Socket
/usr/local/etc/janus/janus.plugin.audiobridge.jcfg[edit]
general: {
# 必要に応じて設定(例)
# string_ids = true
# rtp_port_range = "50000-60000"
# local_ip = "1.2.3.4"
# events = true
}
room-1234: {
description = "Demo Room"
is_private = false
secret = "room-secret" # ルーム操作用パスワード
pin = "room-pin" # 参加時パスワード(必要なら)
sampling_rate = 48000 # or 16000
spatial_audio = true
audiolevel_ext = true
audiolevel_event = true
audio_active_packets = 100
audio_level_average = 25
record = false
# record_dir = "/var/recordings/"
# record_file = "room-1234.wav"
# allow_rtp_participants = false
# rtp_forward_* = ... # 外部RTP転送を使う場合のみ
}
Systemd[edit]
janus.service[edit]
[Unit]
Description=Janus WebRTC Server
After=network.target
[Service]
Type=simple
ExecStart=/usr/local/bin/janus -F /usr/local/etc/janus
Restart=on-failure
User=root
[Install]
WantedBy=multi-user.target
Apache で HTTPS, WSS リバースプロキシ[edit]
仮想ホスト設定(WSS対応)[edit]