Download nginx-rtmp-module:
The official github address of nginx-rtmp-module: https://github.com/arut/nginx-rtmp-module
Use the command:
git clone https://github.com/arut/nginx-rtmp-module.git
The downloaded content is placed in the ~/nginx directory.
The official website of nginx is: http://nginx.org/en/download.html
Install the associated modules:
Not installing these two additional NGINX modules will report an error: ./configure: error: the HTTP rewrite module requires the PCRE library.
sudo apt-get install libpcre3 libpcre3-dev
sudo apt-get install openssl libssl-dev
Add NGINX module
./configure --prefix=/usr/local/nginx --user=nginx --group=nginx --with-http_stub_status_module --with-http_gzip_static_module --with-http_ssl_module --with-http_flv_module --with-http_perl_module --with-mail --with-http_xslt_module --add-module='rtmp模块路径'
compile
sudo make
sudo make install