博风

  • 主页
博风
博览群识,铸学之基
  1. 首页
  2. 运维
  3. 正文

Debian9 Minimal下Nginx1.17.9编译安装…

2021年11月24日 5609点热度 0人点赞 0条评论

项目需要设置一台前端代理,在Nginx与Tengine中考虑了好几天,最后发现Tengine貌似DDNS才好用,而我的后端服务器是固定IP的,又不要DDNS。所以最终选择Nginx,手动点赞。

正好手上有一台$1.00每年的小机器可以用来作为前端。反正配置也差不多(1核心、384M内存、5G硬盘)

赶紧将系统重置为Debian9 Minimal,一切为性能让步。

然后安装基础编译包:
apt-get install gcc g++ make pcel libxml2-dev libxslt1-dev libgeoip-dev
如此便妥了

然后呢?然后肯定是继续下载依赖包嘛,主要包含三个依赖包
OpenSSL、ZLib以及Pcre,下载地址如下
OpenSSL: https://www.openssl.org/source/openssl-3.2.1.tar.gz
Zlib: https://www.zlib.net/zlib-1.3.1.tar.gz
Pcre: https://ftp.pcre.org/pub/pcre/pcre-8.45.tar.gz
ngx_devel_kit: https://github.com/vision5/ngx_devel_kit/archive/refs/tags/v0.3.3.tar.gz
ngx_cache_purge: http://labs.frickle.com/files/ngx_cache_purge-2.3.tar.gz
ngx_slowfs_cache: http://labs.frickle.com/files/ngx_slowfs_cache-1.10.tar.gz
ngx_fancyindex: https://github.com/aperezdc/ngx-fancyindex/archive/refs/tags/v0.5.2.tar.gz

下载之后解压就不用管了

再之后呢?Nginx还没装呢!
不急不急,马上就要开始装了。待我细细道来…
下载Nginx,那是一定的。下载地址:http://nginx.org/download/nginx-1.17.9.tar.gz
下载之后解压,tar zxvf nginx-1.17.9.tar.gz
之后进入到解压后的目录,运行配置命令
./configure --user=nginx --group=nginx --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_ssl_module --with-http_v2_module --with-http_gzip_static_module --with-http_sub_module --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-http_dav_module --with-http_slice_module --with-threads --with-http_addition_module --with-http_gunzip_module --with-http_flv_module --with-http_mp4_module --with-http_random_index_module --with-http_secure_link_module --with-http_geoip_module=dynamic --with-http_xslt_module --with-pcre-jit --with-stream_realip_module --with-openssl=../openssl-3.2.1/ --with-openssl-opt='enable-weak-ssl-ciphers' --with-pcre=../pcre-8.45/ --with-zlib=../zlib-1.3.1/ --add-module=../ngx_devel_kit-0.3.3/ --add-module=../ngx-fancyindex-0.5.2/ --add-module=../ngx_cache_purge-2.3/ --add-module=../ngx_slowfs_cache-1.10/
若无意外,应该是正常了。之后make & make install编译并安装便可。

以上,便是Debian9 Minimal编译安装Nginx 1.17.9的全部信息了。

标签: 暂无
最后更新:2024年4月14日

小白

一只专注于跨境电商的项目狗,主导过App、ERP、独立站、转运等项目全生命周期。对跨境电商相关业务极为熟悉...

点赞
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

最新 热点 随机
最新 热点 随机
ESXi在Linux中通过命令行导出与部署镜像 小米系智能摄像头SAMBA网络存储配置实录 锐角云等EMMC硬盘简单安装PVE 主机常用脚本集 Linux系统(Debian/CentOS)编译安装Git最新版(2.34.1)以及Gitolite
锐角云等EMMC硬盘简单安装PVE 小米系智能摄像头SAMBA网络存储配置实录 Debian9 Minimal下Nginx1.17.9编译安装… Debian/CentOS等Linux开启Google BBR,实现高效加速 Go语言在Linux及Windows系统中的交叉编译
分类
  • 杂七杂八 / 4篇
  • 编程 / 1篇
  • 运维 / 9篇

COPYRIGHT © 2021 bofeng.org. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang