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

推荐订阅源

小众软件
小众软件
A
About on SuperTechFans
博客园 - Franky
Engineering at Meta
Engineering at Meta
Recent Announcements
Recent Announcements
云风的 BLOG
云风的 BLOG
B
Blog
Microsoft Security Blog
Microsoft Security Blog
L
LangChain Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
U
Unit 42
Martin Fowler
Martin Fowler
Y
Y Combinator Blog
Stack Overflow Blog
Stack Overflow Blog
博客园 - 叶小钗
Vercel News
Vercel News
Apple Machine Learning Research
Apple Machine Learning Research
The Cloudflare Blog
Last Week in AI
Last Week in AI
腾讯CDC
Microsoft Azure Blog
Microsoft Azure Blog
爱范儿
爱范儿
V
V2EX
G
Google Developers Blog

博客园 - 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;

再次启动