Ubuntu版本:20.04.1 LTS

Nginx版本:1.22.0

下载地址: https://nginx.org/en/download.html

上传目录:/usr/local/src

安装目录:/usr/local/nginx

源码安装

# 查看操作系统
cat /etc/os-release

# 解压
tar -zxf nginx-1.20.2.tar.gz
cd nginx-1.20.2 # 配置
./configure --prefix=/usr/local/nginx --with-pcre --with-http_ssl_module # 安装
make
make install # 添加nginx环境变量
echo "export PATH=$PATH:/usr/local/nginx/sbin" >> /etc/profile
source /etc/profile

# 修改配置文件
vim /usr/local/nginx/conf/nginx.conf
user www-data;

问题集锦

Unable to locate package wget

apt update && apt install -y wget

./configure: error: C compiler cc is not found

apt install -y build-essential

./configure: error: the HTTP rewrite module requires the PCRE library

apt install -y libpcre3 libpcre3-dev

./configure: error: SSL modules require the OpenSSL library

apt install -y libssl-dev

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

apt install -y zlib1g-dev

最新文章

  1. 深入理解C++对象模型
  2. Storm 实战:构建大数据实时计算
  3. 20145212 《Java程序设计》第6周学习总结
  4. 点击按钮出现60秒倒计时js代码
  5. libstdc++
  6. jwplayer直播
  7. 怎么直接在MySQL客户端上执行SQl文件?
  8. SQL 分组后取最小行号记录
  9. delphi 把多个线程的请求阻塞到另一个线程 TElegantThread
  10. bluetooth发展(五岁以下儿童)------蓝牙功能测试(一个)
  11. UVA106 - Fermat vs. Pythagoras
  12. Eclipse rap 富客户端开发总结(7) : 如何修改rap的样式
  13. 通过了解JS的clientX、pageX、screenX等方法来获取鼠标位置相对屏幕,相对浏览器窗口,相对文档的坐标详解
  14. C#连接数据库open函数失败
  15. 论equals与==不同的重要性
  16. tag-SMASS-1
  17. cal命令详解
  18. IntelliJ IDEA 2018.2.2及以下版本破解方法
  19. (转)SSIS_数据流转换(Union All&合并联接&合并)
  20. ftok函数例子

热门文章

  1. Jmeter之响应数据乱码问题
  2. nuxt.js安装使用
  3. mybatis 之定义拦截器 控制台SQL的打印
  4. MongoDB - 分片简介
  5. springcloud与微服务
  6. 常见非指纹built-in函数
  7. 字符串拼接输出-Predicate接口
  8. Go使用协程批量获取数据,加快接口返回速度
  9. 编程哲学之 C# 篇:005——"Hello,World!"
  10. linux 基础(7)账号和群组的管理