Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Hadryan/1d9a0da9bf41715ff323bdd41b0fa3bb to your computer and use it in GitHub Desktop.
Save Hadryan/1d9a0da9bf41715ff323bdd41b0fa3bb to your computer and use it in GitHub Desktop.
Setup an Ubuntu 16.04, ssh to the server and run the commands
apt-get update
apt-get upgrade
sudo apt-get install build-essential libpcre3 libpcre3-dev libssl-dev unzip mc
cd /opt/
wget http://nginx.org/download/nginx-1.13.0.tar.gz
wget https://github.com/kaltura/nginx-vod-module/archive/master.zip
tar -zxvf nginx-1.13.0.tar.gz
unzip master.zip
cd nginx-1.13.0/
./configure --with-http_ssl_module --with-http_secure_link_module --add-module=../nginx-vod-module-master --with-file-aio --with-threads
# ./configure --with-http_ssl_module --with-http_secure_link_module --add-module=../nginx-vod-module-master --with-file-aio --with-threads --with-debug --with-pcre-jit --user=www-data --group=www-data --with-ipv6 --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_v2_module --with-http_dav_module --with-http_slice_module --with-threads --with-http_addition_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module=dynamic --with-http_sub_module --with-cc-opt="-O3" --with-stream=dynamic --with-stream_ssl_module
make
make install
sudo /usr/local/nginx/sbin/nginx
sudo /usr/local/nginx/sbin/nginx -s stop
sudo nano /usr/local/nginx/conf/nginx.conf
cd /opt
wget https://raw.github.com/JasonGiedymin/nginx-init-ubuntu/master/nginx -O /etc/init.d/nginx
chmod +x /etc/init.d/nginx
update-rc.d nginx defaults
service nginx start
Update crossdomain.xml
nano /usr/local/nginx/html/crossdomain.xml
from comment below
Update nginx.conf
cp /usr/local/nginx/conf/nginx.conf /usr/local/nginx/conf/nginx.conf.original
nano /usr/local/nginx/conf/nginx.conf
from nginx.conf comment below
Upload 3 videos files to /usr/local/nginx/html
101_1.mp4
101_2.mp4
101_3.mp4
Test Installation
HLS URL
http://ip_address/hls/101_1.mp4/index.m3u8
http://ip_address/hls/101_,1,2,3,.mp4.urlset/master.m3u8
DASH URL
http://ip_address/dash/101_1.mp4/manifest.mpd
http://ip_address/hls/101_,1,2,3,.mp4.urlset/manifest.mpd
MP4 URL
http://ip_address/mp4/101_1.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment