An example on how to rebuild nginx rpm/deb package with 3rd party module

ngx_version=$(nginx -v 2>&1 | cut -s -f2 -d '/')
ngx_config=$(nginx -V 2>&1 | cut -s -f2 -d':' | head -2 | tail -1 | awk -F '\--with-cc-opt' '{print $1}')
sudo apt-get install build-essential libpcre3 libpcre3-dev libssl-dev libzip-dev
sudo mkdir ~/build && cd ~/build
sudo git clone git://
sudo wget$ngx_version.tar.gz
sudo tar xzf nginx-$ngx_version.tar.gz && cd nginx-$ngx_version
sudo ./configure $ngx_config --add-module=../nginx-rtmp-module
sudo make
sudo make install

Join the Conversation


  1. what is purpose of add nginx-rtmp-module to nginx since ( nginx-rtmp-module ) is for stream and you didn’t mention that on article ????

    1. this is an example on how to rebuild nginx with custom module (in this example nginx-rtmp-module) if you have installed nginx from rpm/deb repository .
      I use this article as a note for my own usage needs .

Leave a comment

Your email address will not be published. Required fields are marked *