下载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
原文链接: https://www.cnblogs.com/yuan9910/p/13787131.html
欢迎关注
微信关注下方公众号,第一时间获取干货硬货;公众号内回复【pdf】免费获取数百本计算机经典书籍
原创文章受到原创版权保护。转载请注明出处:https://www.ccppcoding.com/archives/203785
非原创文章文中已经注明原地址,如有侵权,联系删除
关注公众号【高性能架构探索】,第一时间获取最新文章
转载文章受原作者版权保护。转载请注明原作者出处!