Skip to content

Installing via Build

Avital Yachin edited this page Jul 11, 2017 · 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 git://github.com/arut/nginx-rtmp-module.git

Download & unpack nginx

 sudo wget http://nginx.org/download/nginx-1.12.0.tar.gz
 sudo tar xzf nginx-1.12.0.tar.gz
 cd nginx-1.12.0

Build nginx with nginx-rtmp

 sudo ./configure --with-http_ssl_module --add-module=../nginx-rtmp-module

or if status module is required

 sudo ./configure --with-http_ssl_module --add-module=../nginx-rtmp-module --with-http_stub_status_module

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