Nginx编译安装
下载安装包
wget https://www.openssl.org/source/openssl-1.1.1k.tar.gz
wget http://www.zlib.net/zlib-1.2.11.tar.gz
wget ftp://ftp.pcre.org/pub/pcre/pcre-8.45.tar.gz
wget http://nginx.org/download/nginx-1.20.1.tar.gz
wget wget https://github.com/openresty/echo-nginx-module/archive/v0.61.tar.gz
wget https://github.com/openresty/echo-nginx-module/archive/v0.61.tar.gz
wget https://github.com/3078825/nginx-image/archive/master.zip
解压到/usr/local/src目录
[root@localhost nginx]# ll /usr/local/src
total 24
drwxr-xr-x. 11 root root 4096 Jun 21 08:44 nginx-1.20.1
drwxrwxr-x. 19 root root 4096 Jun 21 10:17 openssl-1.1.1k
drwxr-xr-x. 9 1169 1169 12288 Jun 21 10:18 pcre-8.45
drwxr-xr-x. 14 501 games 4096 Jun 21 10:18 zlib-1.2.11
[root@localhost nginx]#
编译安装
[root@localhost nginx]# cd /usr/local/src/nginx-1.20.1/
[root@localhost nginx-1.20.1]# pwd
/usr/local/src/nginx-1.20.1
[root@localhost nginx-1.20.1]# ./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-file-aio --with-http_realip_module --with-http_gzip_static_module --with-zlib=/usr/local/src/zlib-1.2.11 --with-pcre=/usr/local/src/pcre-8.45 --with-openssl=/usr/local/src/openssl-1.1.1k
[root@localhost nginx-1.20.1]# make && make install
以上是简易安装,平常项目中需要安装相关模组,以下是典型安装的配置命令
./configure --prefix=/usr/local/nginx --with-http_image_filter_module --with-http_stub_status_module --with-http_ssl_module --with-file-aio --with-http_realip_module --with-http_gzip_static_module --with-zlib=/usr/local/src/zlib-1.2.11 --with-pcre=/usr/local/src/pcre-8.45 --with-openssl=/usr/local/src/openssl-1.1.1k --add-module=/usr/local/src/nginx/echo-nginx-module-0.61 --add-module=/usr/local/src/nginx/ngx_image_thumb-master
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· 一文读懂知识蒸馏
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下