简体   繁体   English

在预建的Nginx上安装rtmp模块

[英]install rtmp module on nginx pre-built

Recently I installed stable version of nginx from nginx.org and configured rtmp module to work with it. 最近,我从nginx.org安装了稳定版的nginx,并配置了rtmp模块来使用它。 After some time I realized that my PHP is not working normal and installed configured PHP with FPM but server was too messy after that. 一段时间后,我意识到我的PHP无法正常工作,并使用FPM安装了配置的PHP,但是之后服务器太乱了。 I got another test server from google engine and installed nginx pre-built package from package manager with apt-get install nginx-full command, but didn't find any way to use rtmp module with that. 我从谷歌引擎那里获得了另一台测试服务器,并使用apt-get install nginx-full命令从软件包管理器中安装了nginx预先构建的软件包,但是找不到任何使用rtmp模块的方法。 As nginx official blog claims that, "not all modules, but some of them, including rtmp module is configurable for pre-built version of nginx". 正如nginx官方博客所声称的那样,“不是所有模块,而是其中的一些模块,包括rtmp模块,都可以针对nginx的预构建版本进行配置”。 I tried to follow guide below: 我尝试遵循以下指南:

https://www.nginx.com/blog/creating-installable-packages-dynamic-modules https://www.nginx.com/blog/creating-installable-packages-dynamic-modules

But at the end it created another nginx folder on some other location to be used with rtmp module. 但是最后,它在其他位置创建了另一个与rtmp模块一起使用的nginx文件夹。 I tried to include conf file of 2nd nginx to use its rtmp but no luck, I messed everything as I'm net in this industry. 我试图包括2nd nginx的conf文件来使用它的rtmp,但是没有运气,我弄糟了所有东西,因为我是这个行业的专家。 Can someone please help me to understand using pre-built nginx with rtmp module? 有人可以帮我了解如何将预构建的Nginx与rtmp模块一起使用吗? Thanks for your time 谢谢你的时间

You have to compile the same version of nginx as the pre-built while adding the dynamic module, on the same machine or an equivalent one and then copy the resulting module .so to the modules directory of the pre-built. 您必须在同一台机器或等效机器上添加动态模块的同时编译预构建版本相同的nginx 版本 ,然后将生成的模块.so复制到预构建modules目录中。

You can then load the module by adding: 然后,您可以通过添加以下内容来加载模块:

load_module modules/some_module.so;

to the configuration of the pre-built and restarting. 到预先构建并重新启动的配置。

Or you can follow the guide and package it in order to avoid the potential pitfalls associated with a manual copy. 或者,您也可以按照指南进行包装,以避免与手动复印相关的潜在陷阱。 You can do this later once it works after a simple copy. 简单复制后,一旦可以使用,您就可以稍后再做。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM