janus-gateway 在macOS上的编译部署

janus-gateway 在macOS上的编译部署

# 下载代码
git clone https://github.com/meetecho/janus-gateway.git
cd janus-gateway

# 安装编译工具及依赖包
brew install 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 \
	graphviz

# brew默认安装doxygen已经是1.8.17版本了,janux需要的是1.8.11以下的版本
# 可以通过下面这种方式来安装较早的版本,这个是版本是1.8.9,测试可用。
# https://github.com/Homebrew/homebrew-core/blob/0fc5461d2fdb219433e512d9eb85437f9dc15df4/Formula/doxygen.rb
brew install doxygen.rb


# config
sh autogen.sh
./configure --prefix=/usr/local/janus PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig --enable-docs


# build
make -20

# install 
make install

# 生成配置文件
cd /usr/local/janus/etc/janus
for s in `ls `; do echo $s; mv $s `sed 's/.sample//g' <<< $s` ;  done

# 运行janus
cd /usr/local/janus
./bin/janus -C ./etc/janus/janus.jcfg

# 运行demo
cd /usr/local/janus/share/janus/demos
python -m SimpleHTTPServer 8080

# 文档路径
/usr/local/janus/share/doc/janus-gateway/janus-gateway-0.9.3/html/index.html

# demo地址
http://localhost:8080
···

看看效果
![videoroom](https://img2020.cnblogs.com/blog/147584/202004/147584-20200417010446456-1776752001.png)

注:
1.上面的步骤了少了turnserver的配置,以后再补上。
2.因为没有配置turnserver,所以只能在内网使用。
posted @ 2020-04-17 01:08  崇山峻岭  阅读(1068)  评论(0编辑  收藏  举报