nginx-vod-module을 이용하여 cmaf 스트리밍 서버를 구축
Ubuntu
apt-get update && apt-get install -y build-essential libpcre3 libpcre3-dev php-gd
CentOS
yum install -y httpd-devel pcre perl pcre-devel zlib zlib-devel GeoIP GeoIP-devel
yum -y install gcc g++ cpp gcc-c++ openssl openssl-devel gd gd-devel libxml2-devel bzip2-devel curl-devel libicu-devel libmcrypt libmcrypt-devel openldap openldap-devel libxslt-devel
*CentOS에서 GeoIP-devel 설치 안될경우
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
Ubuntu의 경우:
1. pcre
./configure: error: the HTTP rewrite module requires the PCRE library.
sudo apt-get install libpcre3 libpcre3-dev
yum install pcre pcre-devel
2. openssl
./configure: error: the HTTP cache module requires md5 functions from OpenSSL library.
sudo apt-get install libssl-dev openssl
yum install openssl openssl-devel
3.gd
./configure: error: the HTTP image filter module requires the GD library.
sudo apt-get install libgd-dev
yum install gd gd-devel
4.geoip
./configure: error: the GeoIP module requires the GeoIP library.
You can either do not enable the module or install the library.
apt-get install libgeoip-dev
yum install -y geoip-devel
5.zlib
./configure: error: the HTTP gzip module requires the zlib library.
sudo apt-get install zlib1g-dev
6.libxslt
./configure: error: the HTTP XSLT module requires the libxml2/libxslt libraries. You can either do not enable the module or install the libraries.
apt-get install libxslt-dev
nginx download
http://nginx.org/en/download.html
위 페이지에서 원하는 다운로드 버전을 받는다.
저는 1.14.2 버전을 이용했습니다.
wget http://nginx.org/download/nginx-1.14.2.tar.gz
tar -xvf nginx-1.14.2.tar.gz
git clone https://github.com/kaltura/nginx-vod-module.git
configure
cd nginx-1.14.2 && ./configure --prefix=/usr/local/nginx --sbin-path=/usr/sbin/nginx --with-cc-opt="-Wno-error" --with-select_module --with-poll_module --with-threads --with-file-aio --with-http_realip_module --with-http_sub_module --with-http_flv_module --with-http_mp4_module --with-http_image_filter_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_slice_module --with-http_geoip_module --with-http_v2_module --with-pcre=../pcre-8.44 --with-pcre-jit --with-zlib=../zlib-1.2.11 --with-http_ssl_module --add-module=../nginx-module-vts --add-module=../nginx-rtmp-module --add-module=../headers-more-nginx-module --add-module=../ngx_http_lower_upper_case --add-module=../nginx_upstream_check_module --add-module=../nginx-aws-auth-module --add-module=../nginx-let-module --with-http_secure_link_module --add-module=../nginx-vod-module --with-threads --with-file-aio
prefix : 설치 폴더 위치 경로
sbin-path : make install 후 바이너리 경로 위치
<trouble shooting>
src/core/ngx_murmurhash.c:37:11: error: this statement may fall through [-Werror=implicit-fallthrough
h = data[2] << 16;
~
src/core/ngx_murmurhash.c:38:5: note: here
case 2:
~
src/core/ngx_murmurhash.c:39:11: error: this statement may fall through [-Werror=implicit-fallthrough=]
h = data[1] << 8;
configure option에 추가 --with-cc-opt="-Wno-error"
build
make && make install
nginx 빌드 및 설치가 완료되었습니다.
위치는 prefix에 있고 필요한 conf 파일 수정을 통해서 설정하면 됩니다.
nginx + hls 스트리밍(vod 파일 이용) (0) | 2020.02.03 |
---|---|
GRRS (GTP(GPRS(General Packet Radio Service) Tunneling Protocol) (0) | 2020.02.01 |
GoP(Group of Pictures) (0) | 2019.07.12 |
댓글 영역