Related to Nginx
How to install Nginx RTMP module?
Here is an example
-
Get dependence
sudo apt-get updatesudo apt-get install dpkg-dev gitsudo apt-get build-dep nginx-extras -
Get source
sudo git clone https://github.com/arut/nginx-rtmp-module.gitsudo apt-get source nginxCheck if nginx-1.10.3 folder exists. When isn't, execute the command again.
sudo apt-get source nginx -
Modify configuration file (you can edit the rule with any text editor you like)
cd nginx-1.10.3sudo vi debian/rulesAdd this flag to the extras_configure_flags, just after
--with-stream_ssl_moduledebian/rules...--add-module=/usr/src/nginx-rtmp-module \... -
Build the package
sudo dpkg-buildpackage -b -uc -us -
Install new package
cd ..sudo apt install ./nginx-common_1.10.3-1+deb9u3_all.debsudo apt install ./nginx-extras_1.10.3-1+deb9u3_amd64.deb
Tips
The module needs to be compiled each time after upgrade the Nginx package. So, you can hold your own Nginx package to prevent accidental automatic upgrades
sudo apt-mark hold nginx
sudo apt-mark hold nginx-extras