일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
- NGINX
- it
- php
- 안드로이드
- 개발자
- mariadb
- C
- server
- 프래그먼트
- 컴퓨터과학총론
- unity
- ubuntu
- 한글
- C lanuage
- 자바
- 개발
- java
- Portfolio
- techEmpower
- MySQL
- H2O
- 번역
- 해석
- centOS7
- kakao
- caddy
- android
- javascript
- 구글
- error
- Today
- Total
개발모음집
NGINX RTMP SOURCE INSTALL 본문
Download, build and install
Build Utilities
sudo apt-get install build-essential libpcre3 libpcre3-dev libssl-dev
Make and CD to build directory (home)
sudo mkdir ~/build && cd ~/buildDownload & unpack latest nginx-rtmp (you can also use http)
sudo git clone git://github.com/arut/nginx-rtmp-module.gitDownload & unpack nginx (you can also use svn)
sudo 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
apt-get update
apt-get install libpcre3 libpcre3-dev
apt-get install build-essential
출처: http://paphopu.tistory.com/20 [파포푸]출처 : http://wifida.tistory.com/118
Build nginx with nginx-rtmp
sudo ./configure --with-http_ssl_module --add-module=../nginx-rtmp-module sudo make sudo make installStart nginx Server
sudo /usr/local/nginx/sbin/nginx
- Set up live streaming
To set up RTMP support you need to add `rtmp{}` section to `nginx.conf` (can be found in PREFIX/conf/nginx.conf). Stock `nginx.conf` contains only `http{}` section.
sudo nano /usr/local/nginx/conf/nginx.confUse this `nginx.conf` instead of stock config:
error_log logs/error.log debug; events { worker_connections 1024; }http { include mime.types; default_type application/octet-stream;sendfile on; keepalive_timeout 65;server { listen 8080; server_name localhost;# sample handlers #location /on_play { # if ($arg_pageUrl ~* localhost) { # return 201; # } # return 202; #} #location /on_publish { # return 201; #}#location /vod { # alias /var/myvideos; #}# rtmp stat location /stat { rtmp_stat all; rtmp_stat_stylesheet stat.xsl; } location /stat.xsl { # you can move stat.xsl to a different location root /usr/build/nginx-rtmp-module; }# rtmp control location /control { rtmp_control all; }error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } }rtmp { server { listen 1935; ping 30s; notify_method get;application myapp { live on;# sample play/publish handlers #on_play http://localhost:8080/on_play; #on_publish http://localhost:8080/on_publish;# sample recorder #recorder rec1 { # record all; # record_interval 30s; # record_path /tmp; # record_unique on; #}# sample HLS #hls on; #hls_path /tmp/hls; #hls_sync 100ms; }# Video on demand #application vod { # play /var/Videos; #}# Video on demand over HTTP #application vod_http { # play http://localhost:8080/vod/; #} } }Restart nginx with:
sudo /usr/local/nginx/sbin/nginx -s stop sudo /usr/local/nginx/sbin/nginx
$ sudo apt install ffmpeg
참고 : github
$ sudo wget https://raw.githubusercontent.com/JasonGiedymin/nginx-init-ubuntu/master/nginx -O /etc/init.d/nginx
$ sudo chmod +x /etc/init.d/nginx
# 자동으로 시작할 수 있게 등록해 줍니다.
$ sudo update-rc.d -f nginx defaults
참고 : 싸피티
에러
1. ./configure command not found
configure를 찾지못하는 이유는 nginx 파일이 있는 곳에서 컴파일 해준게 아니라서 나는 에러
해결법 => cd nginx-1.12.0
2. configure: error: Cannot find ~. Please use ~
"--" -- 이게 0 옆에 있는 -과 github에 적혀있는 - 이 다른듯
해결법 => github에 가서 configure 명령어를 ctrl + C 해서 붙여넣으면 해결
3. ./configure: error: C compiler cc is not found
해결법 => sudo apt-get install build-essential
참고 : paphopu
4. ./configure: error: the HTTP rewrite module requires the PCRE library.
해결법 => $ apt-get install libpcre3 libpcre3-dev
참고 : wifida
5. ./configure: error: SSL modules require the OpenSSL library.
해결법 => $ apt-get install libssl-dev openssl
참고 : wifida
https://github.com/nginx/nginx/blob/master/conf/nginx.conf
http://idchowto.com/?p=13416
mariadb
/etc/init.d/mysql start
php
283 apt install php7.1 php7.1-fpm
284 systemctl start php7.1-fpm
285 systemctl status php7.1-fpm
288 sudo /usr/local/nginx/sbin/nginx -s stop
289 nano /usr/local/nginx/conf/nginx.conf
출처 : https://www.tecmint.com/install-nginx-mysql-php-lemp-in-ubuntu-16-10-ubuntu-16-04/
만약 php설치안되면
apt-add-repository ppa:ondrej/php
apt-get update
'TheRestDevelop' 카테고리의 다른 글
bootstrap - modal로 데이터 넘기기 (0) | 2018.07.24 |
---|---|
WebRTC 조사 (0) | 2018.07.03 |
.txt를 wordcloud파일로 저장하기 (0) | 2018.06.26 |
Traceback (most recent call last): from bs4 import BeautifulSoup ModuleNotFoundError: No module named 'bs4' (0) | 2018.06.22 |
SendMessage Damage has no receiver! (0) | 2018.06.21 |