DasChaos

Build NGINX rtmp

Jan 8th, 2021 (edited)
994
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.98 KB | None | 0 0
  1. #!/bin/bash
  2. sudo apt install -y autoconf build-essential libpcre3 libpcre3-dev libssl-dev git unzip gcc cpp
  3.  
  4. rm -rf nginx-* rtmp-module pcre-* zlib-* openssl-*
  5.  
  6. # build pcre
  7. wget https://ftp.pcre.org/pub/pcre/pcre-8.44.tar.gz
  8. tar -zxf pcre-8.44.tar.gz
  9. cd pcre-8.44
  10. ./configure
  11. make
  12. sudo make install
  13.  
  14. cd ..
  15.  
  16. # build zlib
  17. wget http://zlib.net/zlib-1.2.11.tar.gz
  18. tar -zxf zlib-1.2.11.tar.gz
  19. cd zlib-1.2.11
  20. ./configure
  21. make
  22. sudo make install
  23.  
  24. cd ..
  25.  
  26. # build openssl
  27. wget http://www.openssl.org/source/openssl-1.1.1g.tar.gz
  28. tar -zxf openssl-1.1.1g.tar.gz
  29. cd openssl-1.1.1g
  30. ./Configure darwin64-x86_64-cc --prefix=/usr
  31. make
  32. sudo make install
  33.  
  34. cd ..
  35.  
  36. # build nginx with rtmp
  37. git clone https://github.com/arut/nginx-rtmp-module.git rtmp-module
  38.  
  39. wget https://nginx.org/download/nginx-1.19.0.tar.gz
  40. tar zxf nginx-1.19.0.tar.gz
  41. cd nginx-1.19.0
  42.  
  43. ./configure --add-module=../rtmp-module
  44. make
  45. sudo make install
  46.  
  47. cd ..
  48. rm -rf nginx-* pcre-* zlib-* openssl-* rtmp-module
  49.  
Advertisement
Add Comment
Please, Sign In to add comment