nginx安装成功后如何添加未编译安装模块

nginx安装成功后如何添加未编译安装模块

 

原已经安装好的nginx,现在需要添加一个未被编译安装的模块:

nginx -V 可以查看原来编译时都带了哪些参数

原来的参数:

./configure --sbin-path=/usr/local/sbin --without-http-cache --with-http_stub_status_module --with-http_gzip_static_module --with-pcre=/usr/local/tools/pcre-8.33 --add-module=/usr/local/tools/nginx_mod_h264_streaming-2.2.7

添加的参数:

--with-http_flv_module

步骤如下:

1. 使用参数重新配置:

./configure --sbin-path=/usr/local/sbin --without-http-cache --with-http_stub_status_module --with-http_gzip_static_module --with-http_flv_module --with-pcre=/usr/local/tools/pcre-8.33 --add-module=/usr/local/tools/nginx_mod_h264_streaming-2.2.7

2. 编译:

make

#不要make install,否则就是覆盖安装

3. 替换nginx二进制文件:

备份一下原命令

#cp /usr/local/sbin/nginx /usr/local/sbin/nginx.bak

复制新的命令

# cd nginx-1.4.3/objs/

cp ./nginx /usr/local/sbin/

 

添加 --with-http_mp4_module

./configure --sbin-path=/usr/local/sbin --without-http-cache --with-http_stub_status_module --with-http_gzip_static_module  --with-http_mp4_module --with-http_flv_module --with-pcre=/usr/local/tools/pcre-8.33 --add-module=/usr/local/tools/nginx_mod_h264_streaming-2.2.7

 

添加ssl模块:

./configure --sbin-path=/usr/local/sbin --without-http-cache --with-http_stub_status_module --with-http_gzip_static_module --with-http_mp4_module --with-http_flv_module --with-pcre=/usr/local/tools/pcre-8.33 --add-module=/usr/local/tools/nginx_mod_h264_streaming-2.2.7 --with-http_ssl_module

 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值