Skip to content

Instantly share code, notes, and snippets.

@sandfox
Created September 15, 2012 23:01
Show Gist options
  • Save sandfox/3730253 to your computer and use it in GitHub Desktop.
Save sandfox/3730253 to your computer and use it in GitHub Desktop.
Quick and dirty instructions for building nginx with rtmp support

#Compiling Nginx with RTMP module

  1. Install the following packages sudo apt-get install python-software-properties dpkg-dev git
  2. Add Nginx repo sudo add-apt-repository ppa:nginx/stable
  3. Update package list sudo apt-get update
  4. Get nginx source (put this in it's own dir like /build sudo apt-get source nginx-full
  5. Move into the src dir cd /build/nginx-x.x.x
  6. Grab the build dependecies for nginx-full sudo apt-get build-dep nginx-full
  7. Grab the nginx-rtmp-module source into modules folder for the nginx source cd /build/nginx-x.x.x/debian/modules git clone git://github.com/arut/nginx-rtmp-module.git
  8. Move back into the src dir cd /build/nginx-x.x.x
  9. Add the module to the configure rules in nginx-x.x.x/debian/rules for all the versions --add-module=$(MODULESDIR)/nginx-rtmp-module \
  10. Make an update to the changelog dch -i
  11. rebuild the package sudo dpkg-buildpackage -uc -b
  12. The debs can be installed using sudo dpkg -i PACKAGE_NAME.deb (you'll need to move all the debs)

This can probably be done a slightly less clunky fashion or by using the Launchpad PPA system somehow

@gzcwnk
Copy link

gzcwnk commented Feb 19, 2017

root@debian8:/usr/src/nginx-1.6.2# dch -i
-su: dch: command not found

:(

apt-get install -y devscripts

:)

@gzcwnk
Copy link

gzcwnk commented Feb 19, 2017

$(MODULESDIR) is meant to be changed to the actual path or is it a variable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment