Difference between revisions of "Raspbian: Instalasi nginx dan RTMP"
Jump to navigation
Jump to search
Onnowpurbo (talk | contribs) (New page: Instalasi aplikasi pendukung sudo apt-get install build-essential libpcre3 libpcre3-dev libssl-dev Download source code cd /usr/local/src wget http://nginx.org/download/nginx-1.6.1.t...) |
Onnowpurbo (talk | contribs) |
||
(6 intermediate revisions by the same user not shown) | |||
Line 6: | Line 6: | ||
cd /usr/local/src | cd /usr/local/src | ||
+ | wget http://nginx.org/download/nginx-1.7.5.tar.gz | ||
wget http://nginx.org/download/nginx-1.6.1.tar.gz | wget http://nginx.org/download/nginx-1.6.1.tar.gz | ||
wget https://github.com/arut/nginx-rtmp-module/archive/master.zip | wget https://github.com/arut/nginx-rtmp-module/archive/master.zip | ||
Line 12: | Line 13: | ||
cd /usr/local/src | cd /usr/local/src | ||
− | tar -zxvf nginx-1. | + | tar -zxvf nginx-1.7.5.tar.gz |
unzip master.zip | unzip master.zip | ||
Compile | Compile | ||
− | cd /usr/local/src/nginx-1. | + | cd /usr/local/src/nginx-1.7.5 |
./configure --with-http_ssl_module --add-module=../nginx-rtmp-module-master | ./configure --with-http_ssl_module --add-module=../nginx-rtmp-module-master | ||
make | make | ||
sudo make install | sudo make install | ||
+ | |||
+ | Beberapa catatan penting | ||
+ | |||
+ | nginx path prefix: "/usr/local/nginx" | ||
+ | nginx binary file: "/usr/local/nginx/sbin/nginx" | ||
+ | nginx configuration prefix: "/usr/local/nginx/conf" | ||
+ | nginx configuration file: "/usr/local/nginx/conf/nginx.conf" | ||
+ | nginx pid file: "/usr/local/nginx/logs/nginx.pid" | ||
+ | nginx error log file: "/usr/local/nginx/logs/error.log" | ||
+ | nginx http access log file: "/usr/local/nginx/logs/access.log" | ||
+ | nginx http client request body temporary files: "client_body_temp" | ||
+ | nginx http proxy temporary files: "proxy_temp" | ||
+ | nginx http fastcgi temporary files: "fastcgi_temp" | ||
+ | nginx http uwsgi temporary files: "uwsgi_temp" | ||
+ | nginx http scgi temporary files: "scgi_temp" | ||
+ | |||
+ | ==Konfigurasi untuk Streaming== | ||
+ | |||
+ | Edit | ||
+ | |||
+ | vi /usr/local/nginx/conf/nginx.conf | ||
+ | |||
+ | Tambahkan di bawah | ||
+ | |||
+ | rtmp { | ||
+ | server { | ||
+ | listen 1935; | ||
+ | chunk_size 4096; | ||
+ | |||
+ | application live { | ||
+ | live on; | ||
+ | record off; | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | |||
+ | Restart nginx | ||
+ | |||
+ | sudo /usr/local/nginx/sbin/nginx -s stop | ||
+ | sudo /usr/local/nginx/sbin/nginx | ||
+ | |||
+ | |||
+ | ==Streaming dari Android== | ||
+ | |||
+ | * Siapkan Android | ||
+ | * Install apps OS Broadcaster | ||
+ | |||
+ | Set | ||
+ | |||
+ | Server: rtmp://ip-address-server/live | ||
+ | Play Path/Stream Key: test | ||
+ | |||
+ | Stream dapat di lihat misalnya menggunakan VLC dengan alamat | ||
+ | |||
+ | rtmp://ip-address-server/live/test |
Latest revision as of 08:03, 18 September 2014
Instalasi aplikasi pendukung
sudo apt-get install build-essential libpcre3 libpcre3-dev libssl-dev
Download source code
cd /usr/local/src wget http://nginx.org/download/nginx-1.7.5.tar.gz wget http://nginx.org/download/nginx-1.6.1.tar.gz wget https://github.com/arut/nginx-rtmp-module/archive/master.zip
Buka source code
cd /usr/local/src tar -zxvf nginx-1.7.5.tar.gz unzip master.zip
Compile
cd /usr/local/src/nginx-1.7.5 ./configure --with-http_ssl_module --add-module=../nginx-rtmp-module-master make sudo make install
Beberapa catatan penting
nginx path prefix: "/usr/local/nginx" nginx binary file: "/usr/local/nginx/sbin/nginx" nginx configuration prefix: "/usr/local/nginx/conf" nginx configuration file: "/usr/local/nginx/conf/nginx.conf" nginx pid file: "/usr/local/nginx/logs/nginx.pid" nginx error log file: "/usr/local/nginx/logs/error.log" nginx http access log file: "/usr/local/nginx/logs/access.log" nginx http client request body temporary files: "client_body_temp" nginx http proxy temporary files: "proxy_temp" nginx http fastcgi temporary files: "fastcgi_temp" nginx http uwsgi temporary files: "uwsgi_temp" nginx http scgi temporary files: "scgi_temp"
Konfigurasi untuk Streaming
Edit
vi /usr/local/nginx/conf/nginx.conf
Tambahkan di bawah
rtmp { server { listen 1935; chunk_size 4096; application live { live on; record off; } } }
Restart nginx
sudo /usr/local/nginx/sbin/nginx -s stop sudo /usr/local/nginx/sbin/nginx
Streaming dari Android
- Siapkan Android
- Install apps OS Broadcaster
Set
Server: rtmp://ip-address-server/live Play Path/Stream Key: test
Stream dapat di lihat misalnya menggunakan VLC dengan alamat
rtmp://ip-address-server/live/test