64

I have installed Nginx in our redhat machine using rpm. Now we want to add nginx-rtmp module, but inorder to add new module as per the document i need to build it by downloading the tar ball. Does it mean that i have to remove the rpm and install it as per the document.

Ref: https://github.com/arut/nginx-rtmp-module/wiki/Getting-started-with-nginx-rtmp

./configure --add-module=/usr/build/nginx-rtmp-module
make
make install

5 Answers 5

45

With nginx 1.9.11, it's not necessary to recompile the server, as they added support for dynamic modules. Take a look here: https://www.nginx.com/blog/dynamic-modules-nginx-1-9-11/

2
  • 1
    "In the first release of dynamic modules, you still need to compile the optional NGINX modules at the same time as the NGINX binary" from the source you quoted.
    – Leia
    Commented Jan 9, 2017 at 20:13
  • 3
    @Leia sure but if you get nginx from a repository, you can also pull binaries of the optional modules from the same repository, as long as whomever maintains the repository builds them together. Commented Aug 9, 2017 at 16:11
41

Unlike Apache, all modules, including the 3rd party modules, are going to be compiled into nginx. So every time you want to add a new module, you have to recompile nginx.

So yes, you have to install it as per the document. There is no much value of keeping 2 nginx runtimes on the same server any way. So you may also want to remove the previous nginx.

5
7

I had a similar problem where the auth-pam module broke after an upgrade. Here's what fixed it for me (debian stretch/sid, nginx 1.10.2):

apt install libnginx-mod-http-auth-pam
ln -s /usr/share/nginx/modules-available/mod-http-auth-pam.conf /etc/nginx/modules-enabled/50-mod-http-auth-pam.conf

The config file contains a single “load_module” directive which tells nginx to dynamically load the module on startup. As jekennedy mentioned, this would only apply to newer versions of nginx that support dynamic module loading.

0
3

Following the steps in this post from the nginx blog page called "Compilation of Dynamic Modules for NGINX Plus", i could compiled the RTMP módule, downloading the nginx-rtmp-module from Github and import it on my webserver.

Regards.

3

Yes, you have to uninstall nginx (installed via rpm) and re-install it according to the mentioned document that is from source file. There are some disadvantages of installing nginx using source, like you cannot use nginx as a service. Here, you can find instructions to do same thing with all the functionalities you get while installing nginx using OS-respective packages.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.