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

推荐订阅源

博客园_首页
J
Java Code Geeks
IT之家
IT之家
Last Week in AI
Last Week in AI
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
B
Blog RSS Feed
P
Proofpoint News Feed
博客园 - Franky
MongoDB | Blog
MongoDB | Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 【当耐特】
Microsoft Security Blog
Microsoft Security Blog
I
InfoQ
B
Blog
Stack Overflow Blog
Stack Overflow Blog
Martin Fowler
Martin Fowler
博客园 - 聂微东
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Apple Machine Learning Research
Apple Machine Learning Research
大猫的无限游戏
大猫的无限游戏
U
Unit 42
aimingoo的专栏
aimingoo的专栏

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

再次启动