Skip to content

Installing via Build

DDeploy edited this page Sep 18, 2022 · 18 revisions

Download, Build and Install

Create Build Directory

 cd ~
 sudo mkdir nginx
 cd nginx

Build Utilities

 sudo apt-get install git gcc make libpcre3-dev libssl-dev

On Amazon Linux:

 sudo yum install git gcc make pcre-devel openssl-devel

Download & unpack latest nginx-rtmp

 sudo git clone https://github.com/arut/nginx-rtmp-module.git

Download & unpack nginx

 sudo wget https://nginx.org/download/nginx-1.21.0.tar.gz
 sudo tar xzf nginx-1.21.0.tar.gz
 cd nginx-1.21.0.tar.gz

Build nginx with nginx-rtmp

 ./configure --with-http_ssl_module --add-module=../nginx-rtmp-module --with-debug --with-cc-opt="-Wimplicit-fallthrough=0"

or if status module is required

 sudo ./configure --with-http_ssl_module --add-module=../nginx-rtmp-module --with-http_stub_status_module --with-debug --with-cc-opt="-Wimplicit-fallthrough=0"

Install

 sudo make
 sudo make install

Start nginx Server

 sudo /usr/local/nginx/sbin/nginx

Test NGINX via a web browser

 http://<server IP>

To set up RTMP support you need to add rtmp{} section to nginx.conf (can be found in PREFIX/conf/nginx.conf). Stock nginx.conf contains only http{} section.

 sudo nano /usr/local/nginx/conf/nginx.conf

Restart nginx with:

    sudo /usr/local/nginx/sbin/nginx -s stop
    sudo /usr/local/nginx/sbin/nginx

Install FFmpeg

    sudo apt-get install ffmpeg
Clone this wiki locally