~scripts
58 itemsDownload ./*

58 itemsDownload ./*

..
display
dzen2
nginx
tiling
vosh
4cdl
4trips
alarm
ambient
battery-monitor
checkit
cleverbot.py
clock
color-gen
colors-hex
colorscheme.sh
compton.sh
dailywall
dmenu
ffthumb
grid
gridmacro
gridmacro.kde
help
importw
indexer
install-all.sh
install-twily.sh
installng
mp3ogg
netspeed.sh
orage
pipes
pipes.x
pipewire_bt.sh
ports
rain
randwall
readystart.sh
rotate.sh
scan.sh
screencast
screencast2
scrot
scrotw
search
skull
slocker
startblender.sh
starwars
streamit
sumnum
synctimedate.sh
tty-colorize
usrmount
ytp
ytplay
zombie-restart.sh


scriptsinstallng
1 486•  5 years ago•  DownloadRawClose
5 years ago•  1 486

{}
#!/bin/bash
#
# Install Standalone NGINX Server for Streaming RTMP HLS and DASH
# (Does Not require root).
#
# This also downloads a custom premade nginx config file as well
# as a website(html) for playback stream with ajax chat system.
#
# Edit Oct2019, added --with-cc-opt="-Wno-error" to fix compiling
# for ubuntu 18*
#
# Author: Twily     2018-2019
# Website: twily.info
# Requires: libssl-dev

# By default install into ~/nginx/*
# Make sure DIR is correct!
DIR=$HOME/nginx

mkdir $DIR/src -p
cd $DIR/src

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

# More versions https://sourceforge.net/projects/pcre/files/pcre/
wget http://kent.dl.sourceforge.net/sourceforge/pcre/pcre-8.40.tar.gz
tar -xzvf pcre-8.40.tar.gz

# More versions http://nginx.org/en/download.html
wget http://nginx.org/download/nginx-1.13.0.tar.gz
tar -xzvf nginx-1.13.0.tar.gz
cd nginx-1.13.0

./configure --prefix=$DIR --with-cc-opt="-Wno-error" --with-http_ssl_module --with-file-aio --with-pcre=../pcre-8.40 --add-module=../nginx-rtmp-module
make
make install

cd $DIR

# Tools for controlling server
echo -e "#!/bin/bash\n./sbin/nginx" > startng
echo -e "#!/bin/bash\n./sbin/nginx -s stop" > stopng
echo -e "#!/bin/bash\n./sbin/nginx -t && ./sbin/nginx -s reload" > reloadng
chmod +x {startng,stopng,reloadng}

# Premade configuration file
wget https://twily.info/nginxfiles/vjs/twily-stream-service.html -O twily-stream-service.html
wget https://twily.info/nginxfiles/vjs/camonline.txt -O camonline.txt
wget https://twily.info/nginxfiles/nginx.conf -O nginx.conf
wget https://twily.info/nginxfiles/makethumb -O makethumb
mkdir html
mv twily-stream-service.html html/twily-stream-service.html
mv camonline.txt html/camonline.txt
mv conf/nginx.conf conf/nginx.conf.bk
mv nginx.conf conf/nginx.conf
chmod +x ./makethumb
ln -s html/twily-stream-service.html twily-stream-service.html
ln -s conf/nginx.conf nginx.conf

echo -e "\n>NGINX has been installed to \"$DIR\".\n"
exit

Top
©twily.info 2013 - 2024
twily at twily dot info



2 175 673 visits
... ^ v