Nginx-rtmp-module: Porovnání verzí

Z Poznámkový blok
Přejít na: navigace, hledání
(Odkazy)
(Ubuntu using PPAs)
Řádka 31: Řádka 31:
  
 
  sudo service nginx start  - pokud nginx neběží.
 
  sudo service nginx start  - pokud nginx neběží.
 +
 +
=== Nenanstaluje se ===
 +
dpkg: dependency problems prevent configuration of nginx-full:
 +
  nginx-full depends on libnginx-mod-http-auth-pam (= 1.14.2-2+deb10u4); however:
 +
  Package libnginx-mod-http-auth-pam is not installed.
 +
  nginx-full depends on libnginx-mod-http-dav-ext (= 1.14.2-2+deb10u4); however:
 +
  Package libnginx-mod-http-dav-ext is not installed.
 +
  nginx-full depends on libnginx-mod-http-echo (= 1.14.2-2+deb10u4); however:
 +
  Package libnginx-mod-http-echo is not installed.
 +
  nginx-full depends on libnginx-mod-http-geoip (= 1.14.2-2+deb10u4); however:
 +
  Package libnginx-mod-http-geoip is not installed.
 +
  nginx-full depends on libnginx-mod-http-image-filter (= 1.14.2-2+deb10u4); however:
 +
  Package libnginx-mod-http-image-filter is not installed.
 +
  nginx-full depends on libnginx-mod-http-subs-filter (= 1.14.2-2+deb10u4); however:
 +
  Package libnginx-mod-http-subs-filter is not installed.
 +
  nginx-full depends on libnginx-mod-http-upstream-fair (= 1.14.2-2+deb10u4); however:
 +
  Package libnginx-mod-http-upstream-fair is not installed.
 +
  nginx-full depends on libnginx-mod-http-xslt-filter (= 1.14.2-2+deb10u4); however:
 +
  Package libnginx-mod-http-xslt-filter is not installed.
 +
  nginx-full depends on libnginx-mod-mail (= 1.14.2-2+deb10u4); however:
 +
  Package libnginx-mod-mail is not installed.
 +
  nginx-full depends on libnginx-mod-stream (= 1.14.2-2+deb10u4); however:
 +
  Package libnginx-mod-stream is not installed.
  
 
=== Build and Install ===
 
=== Build and Install ===

Verze z 11. 8. 2021, 20:14

Odkazy

Instalace

Ubuntu using PPAs

apt install dpkg-dev
mkdir /usr/src/nginx
chown -R _apt:root /usr/src/nginx
cd /usr/src/nginx
apt source nginx
git clone https://github.com/arut/nginx-rtmp-module.git
cd nginx-[version-number]

vi debian/rules

Upravte pravidla a na konci přidejte konfigurační řetězec doplňkových modulů:

--add-module=/usr/src/nginx/nginx-rtmp-module \

Pokud instalujete poprvé, vytvořte závislosti nginx.

apt-get build-dep nginx
dpkg-buildpackage -b -uc -us  

Tento příkaz generuje nepodepsané deb soubory pro místní použití. Chvíli počkejte, než se staví ... opravdu dlouho ... jako byste si chtěli zajít na jídlo.

cd .. 
dpkg --install nginx-common_1.14.2-2+deb10u4_all.deb nginx-full_1.14.2-2+deb10u4_amd64.deb
apt update && apt --fix-broken install
dpkg --install nginx-common_1.14.2-2+deb10u4_all.deb nginx-full_1.14.2-2+deb10u4_amd64.deb

service nginx status
sudo service nginx start  - pokud nginx neběží.

Nenanstaluje se

dpkg: dependency problems prevent configuration of nginx-full:
 nginx-full depends on libnginx-mod-http-auth-pam (= 1.14.2-2+deb10u4); however:
  Package libnginx-mod-http-auth-pam is not installed.
 nginx-full depends on libnginx-mod-http-dav-ext (= 1.14.2-2+deb10u4); however:
  Package libnginx-mod-http-dav-ext is not installed.
 nginx-full depends on libnginx-mod-http-echo (= 1.14.2-2+deb10u4); however:
  Package libnginx-mod-http-echo is not installed.
 nginx-full depends on libnginx-mod-http-geoip (= 1.14.2-2+deb10u4); however:
  Package libnginx-mod-http-geoip is not installed.
 nginx-full depends on libnginx-mod-http-image-filter (= 1.14.2-2+deb10u4); however:
  Package libnginx-mod-http-image-filter is not installed.
 nginx-full depends on libnginx-mod-http-subs-filter (= 1.14.2-2+deb10u4); however:
  Package libnginx-mod-http-subs-filter is not installed.
 nginx-full depends on libnginx-mod-http-upstream-fair (= 1.14.2-2+deb10u4); however:
  Package libnginx-mod-http-upstream-fair is not installed.
 nginx-full depends on libnginx-mod-http-xslt-filter (= 1.14.2-2+deb10u4); however:
  Package libnginx-mod-http-xslt-filter is not installed.
 nginx-full depends on libnginx-mod-mail (= 1.14.2-2+deb10u4); however:
  Package libnginx-mod-mail is not installed.
 nginx-full depends on libnginx-mod-stream (= 1.14.2-2+deb10u4); however:
  Package libnginx-mod-stream is not installed.

Build and Install

Vytvořit Build Directory

cd ~
sudo mkdir nginx
cd nginx

Doinstalujte nastroje

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

Stáhněte a rozbalte nejnovější nginx-rtmp

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

Stáhněte a rozbalte nginx. Na http://nginx.org/ si ověříme odkaz na nejnovější verzi.

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

Vytvořte nginx pomocí nginx-rtmp

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

nebo pokud je vyžadován stavový modul

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

Nainstalujte

make
make install

Spusťte server nginx

/usr/local/nginx/sbin/nginx

Otestujte NGINX prostřednictvím webového prohlížeče

http://<server IP>


Chcete-li nastavit podporu RTMP, musíte do sekce nginx.conf přidat sekci rtmp {} (najdete ji v PREFIX/conf/nginx.conf). Sklad nginx.conf obsahuje pouze sekci http {}.

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

Restartujte nginx pomocí:

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

Nainstalujte FFmpeg

apt-get install ffmpeg