编译安装Nginx及所需的依赖包以及常用插件


下载nginx包,具体版本查看Nginx官方下载地址

wget http://nginx.org/download/nginx-1.17.10.tar.gz

一些编译安装要用到的依赖包

gcc  gcc-c++  make pcre-devel zlib-devel openssl-devel

openssl-devel(用于加密)

常用插件

--prefix=/usr/local/nginx \
--user=nginx \
--group=nginx \
--with-http_stub_status_module \
--with-http_ssl_module \
--with-http_flv_module \
--with-http_gzip_static_module

--prefix=/usr/local/nginx(指定安装路径)
--user=nginx --group=nginx(指定运行用户和组)
--with-http_stub_status_module(启用该模块以支持状态统计)
--with-http_ssl_module(启用SSL模块)
--with-http_flv_module(启用FLV模块,提供寻求内存使用基于时间的偏移量文件)
--with-http_gzip_static_module(预读gzip功能)

常用插件2 (内含stream模块反向代理)

--prefix=/usr/local/nginx \
--with-http_stub_status_module \
--with-http_ssl_module \
--with-http_realip_module \
--with-http_flv_module \
--with-http_mp4_module \
--with-http_gzip_static_module \
--with-stream \
--with-stream_realip_module \
--with-stream_ssl_module && make && make install

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM