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