国产操作系统银河麒麟V10-SP1-arm服务器系统上编译安装nginx

本次编译使用在鲲鹏920arm架构服务器上编译nginx1.20版本的nginx服务,使用的主要模块有nginx-push-stream-module、nginx-upload-progress-module、ngx_cache_purge、ngx_devel_kit、ngx_http_substitutions_filter_module、ngx-fancyindex

下载nginx和对应模块源码包
#下载1.20.1nginx源码包
wget http://nginx.org/download/nginx-1.20.1.tar.gz

在nginx维基上https://www.nginx.com/resources/wiki/search/下载对应使用的模块,放到 /var/www/nginx-1.20.0/build/ 目录中
在这里插入图片描述

编译安装nginx模块

使用如下的编译参数

/configure --with-cc=/usr/bin/gcc \
--with-cc-opt='-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2' \
 --with-ld-opt='-Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now' \
 --conf-path=/usr/local/nginx/conf/nginx.conf  \
 --http-log-path=/var/log/nginx/access.log  \
 --error-log-path=/var/log/nginx/error.log  \
 --lock-path=/var/lock/nginx.lock  \
 --pid-path=/run/nginx.pid \
 --http-client-body-temp-path=/var/lib/nginx/body \
 --http-fastcgi-temp-path=/var/lib/nginx/fastcgi \
 --http-proxy-temp-path=/var/lib/nginx/proxy \
 --http-scgi-temp-path=/var/lib/nginx/scgi \
 --http-uwsgi-temp-path=/var/lib/nginx/uwsgi \
 --with-debug --with-pcre-jit \
 --with-http_ssl_module \
 --with-http_stub_status_module \
 --with-http_realip_module \
 --with-http_auth_request_module \
 --with-http_addition_module \
 --with-http_dav_module \
 --with-http_flv_module \
 --with-http_geoip_module \
 --with-http_gunzip_module \
 --with-http_gzip_static_module \
 --with-http_image_filter_module \
 --with-http_mp4_module \
 --with-http_perl_module \
 --with-http_random_index_module \
 --with-http_secure_link_module \
 --with-http_v2_module \
 --with-http_sub_module \
 --with-mail \
 --with-mail_ssl_module \
 --with-stream \
 --with-stream_ssl_module \
 --with-threads \
 --add-module=/var/www/nginx-1.20.0/build/nginx-push-stream-module \
 --add-module=/var/www/nginx-1.20.0/build/nginx-upload-progress-module \
 --add-module=/var/www/nginx-1.20.0/build/ngx_cache_purge \
 --add-module=/var/www/nginx-1.20.0/build/ngx_devel_kit \
 --add-module=/var/www/nginx-1.20.0/build/ngx_http_substitutions_filter_module \
 --add-module=/var/www/nginx-1.20.0/build/ngx-fancyindex --with-http_xslt_module 

执行完之后
make;make install

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值