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.
3 Answers
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:
1You 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 nginxThe 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.
4after add the rtmp module
sudo apt install libnginx-mod-rtmpfor restarting nginx as service you can try
sudo service nginx restart