9

Installing Nginx on Ubuntu 18.04 was easy peasy, adding the RTMP module has resulted in less success for me. Preferably up-to-date version. I have been using the Nginx RTMP on Previous Ubuntu versions with no problem.

I consider myself a beginner to Linux, learning on the go!
Usage: Custom mobile streaming.

Aaron Hall
  • 1,059
Wogel
  • 91

3 Answers3

14

nginx-rtmp module can be installed directly from the Ubuntu 18.04 repository

sudo apt install libnginx-mod-rtmp

The latest version of nginx supports dynamic modules, make sure the statement to load the module is added in the nginx.conf:

load_module "modules/ngx_rtmp_module.so";

reference: https://stackoverflow.com/questions/36554405/how-to-enable-dynamic-module-with-an-existing-nginx-installation

Domi
  • 141
9

You cannot install the 'latest' RTMP module without recompiling NGINX at the same time, currently.

However, the RTMP module is available in the repositories already, but it is not called in by any specific NGINX flavor anymore. You will need to install the module with libnginx-mod-rtmp - this will install the RTMP module that was compiled alongside NGINX when the packages were built, and then you should just need to restart and configure NGINX to use the RTMP module and its settings. (beyond the scope of this question)

sudo apt install libnginx-mod-rtmp
sudo systemctl stop nginx
sudo systemctl start nginx

The three aforementioned commands will be able to install the RTMP module. While it might not be the absolute latest of the code, it should provide most of the features that the RTMP module supports.

Thomas Ward
  • 78,878
1

after add the rtmp module

 sudo apt install libnginx-mod-rtmp

for restarting nginx as service you can try

 sudo service nginx restart