OpenWrt 编译安装 Nginx rtmp module

参考 https://wonpn.com/2018-03-15-compile-nginx-with-ssl.html

1. 下载 OpenWrt SDK

这里我使用的是斐讯K3,所以下载 bcm53xx 的。

wget https://downloads.openwrt.org/releases/18.06.2/targets/bcm53xx/generic/openwrt-sdk-18.06.2-bcm53xx_gcc-7.3.0_musl_eabi.Linux-x86_64.tar.xz
tar xf openwrt-sdk-18.06.2-bcm53xx_gcc-7.3.0_musl_eabi.Linux-x86_64.tar.xz

2. 下载 Nginx rtmp module

wget https://github.com/arut/nginx-rtmp-module/archive/v1.2.1.zip
unzip v1.2.1.zip

3. 下载nginx并添加设置选项

./scripts/feeds update
./scripts/feeds search nginx
./scripts/feeds install nginx

修改 package/feeds/packages/nginx/Congif.in 添加:

config NGINX_RTMP
         bool
         prompt "Enable RTMP module"
         help
                 Enable RTMP module
         default n

修改 package/feeds/packages/nginx/Makefile ,在213行附近(TARGET_CFLAGS前)添加:

ifeq ($(CONFIG_NGINX_RTMP),y)
  ADDITIONAL_MODULES += --add-module=/path/to/nginx-rtmp-module
endif

4. 修改和编译

make menuconfig
# 在network->Web Servers/Proxies->Nginx->Configuration->开启 Enable SSL module 和 Enable RTMP module 
# (如没有RTMP module请检查是否在Config.in重添加)
make -j4

5. 抱走 Nginx 包

cp bin/packages/arm_cortex-a9/packages/nginx_1.12.2-1_arm_cortex-a9.ipk /where/you/want
摸完了

2 thoughts to “OpenWrt 编译安装 Nginx rtmp module”

电子卓越班进行回复 取消回复

您的电子邮箱地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据