惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The GitHub Blog
The GitHub Blog
Hugging Face - Blog
Hugging Face - Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
WordPress大学
WordPress大学
Y
Y Combinator Blog
Google DeepMind News
Google DeepMind News
大猫的无限游戏
大猫的无限游戏
Vercel News
Vercel News
V
Visual Studio Blog
Microsoft Azure Blog
Microsoft Azure Blog
MyScale Blog
MyScale Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
罗磊的独立博客
N
Netflix TechBlog - Medium
M
MIT News - Artificial intelligence
G
Google Developers Blog
阮一峰的网络日志
阮一峰的网络日志
P
Proofpoint News Feed
小众软件
小众软件
Engineering at Meta
Engineering at Meta
D
DataBreaches.Net
S
SegmentFault 最新的问题
H
Help Net Security
量子位

博客园 - le.li

python: 安装python 依赖pip install xxx报错,'pip' 不是内部或外部命令,也不是可运行的程序 nginx:普通用户使用80端口启动nginx报错,nginx: [emerg] bind() to 0.0.0.0:80 failed (13: Permission denied) redis:linux安装redis linux:su切换用户后ll报错 JDK:Linux下载安装jdk1.8 Redis:访问redis报错(error) NOAUTH Authentication required idea:打开黑屏 android: onClick与onTouch冲突,onclick事件没有触发 [Mysql]快速执行sql文件 [JAVA]JDK多版本设置 JAVA: Mybatis添加xml执行多行更新语句时报错 Android: 添加默认菜单 Android:android studio使用本地路径依赖 [idea]mvn install没有问题,idea build报错:java: Compilation failed: internal java compiler error Android:adb devices返回设备状态offline Wireshark:记一次抓包过程 Android:adb查看手机启动端口 Android:androidx.appcompat.app.AppCompatActivity添加返回按钮 Android:查看依赖
nginx:linux系统安装nginx
le.li · 2025-11-29 · via 博客园 - le.li

下载nginx

http://nginx.org/ 

直接下载1.29.3版本也可以

http://nginx.org/download/nginx-1.29.3.tar.gz

官网不再看到linux系统的release版本

上传下载包到linux系统,解压并执行命令(说明:./configure --prefix=/usr/local/nginx --with-http_ssl_module)

--prefix指定安装路径

tar -zxvf nginx-1.29.3.tar.gz
 ./configure

报错:

./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module

添加缺失依赖


yum install -y pcre
yum install -y pcre-devel

./configure: error: the HTTP gzip module requires the zlib library.

yum install -y zlib
yum install -y zlib-devel

模糊总结:缺少什么包,就安装该包和该包-devel,不好使,再搜索其他方式

再次执行

Configuration summary
+ using system PCRE library
+ OpenSSL library is not used
+ using system zlib library

执行完毕后,显示OpenSSL library is not used,说明没有启用ssl

./configure --prefix=/usr/local/nginx --with-http_ssl_module

 报错:

./configure: error: SSL modules require the OpenSSL library.
You can either do not enable the modules, or install the OpenSSL library

如果不需要ssl支持可以不配置该参数(或者使用参数 --without-http_ssl_module)

yum install -y openssl-devel

再次执行,可以看到任务执行完成后,生成了objs文件夹。即结果。

image

添加http2模块支持--with-http_v2_module

./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-http_v2_module

 安装

启动时报错

nginx: [emerg] bind() to 0.0.0.0:80 failed (13: Permission denied)

一般80小于1024的端口需要高权限才能启动,执行sudo启动

如果遇到warn,nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2

可以将配置

listen       443 ssl  http2;  改成  

listen 443 ssl;
http2 on;

再次启动