centos7 下安装带nginx-rtmp-module的nginx服务

日志 / 373人浏览 / 0人评论

在centos7 下安装带nginx-rtmp-module的nginx服务

首先要有以下几个开源软件


  • nginx   #cd /usr/local/src && wgethttp://nginx.org/download/nginx-1.9.9.tar.gz
  • nginx-rtmp-module #   git lcone git://github.com/arut/nginx-rtmp-module.git

下载nginx-rtmp-module安装nginx:

$ yum -y install gcc gcc-c++ autoconf automake make

$cd /usr/local/src &&wgethttp://nginx.org/download/nginx-1.9.9.tar.gz

$ tar -zxvfnginx-1.9.9.tar.gz

$git lcone git://github.com/arut/nginx-rtmp-module.git

$ cdnginx-1.9.9

$   ./configure --prefix=/usr/local/nginx --add-module=../nginx-rtmp-module --with-http_ssl_module

报了一个错误:


./configure: error: the HTTP rewrite module requires the PCRE library.

You can either disable the module by using --without-http_rewrite_module

option, or install the PCRE library into the system, or build the PCRE library

statically from the source with nginx by using --with-pcre=option.

需要安装pcre

$ yum -y install pcre-devel

继续编译

$./configure --prefix=/usr/local/nginx --add-module=../nginx-rtmp-module --with-http_ssl_module

报了一个错误:

./configure: error: SSL modules require the OpenSSL library.

You can either do not enable the modules, or install the OpenSSL library

into the system, or build the OpenSSL library statically from the source

with nginx by using --with-openssl=option.


需要安装openssl

$   yum -y install openssl openssl-devel


继续编译

$./configure --prefix=/usr/local/nginx --add-module=../nginx-rtmp-module --with-http_ssl_module

$ make && make install

















感谢博主,喝杯咖啡~

0 条评论

还没有人发表评论

发表评论 取消回复

记住我的信息,方便下次评论
有人回复时邮件通知我