• 已删除用户
Administrator
发布于 2021-08-11 / 39 阅读 / 0 评论 / 0 点赞

Ubuntu安装nginx

1.首先下载一下几个文件,上传至Ubuntu /usr/local/src/ 目录并解压缩

tar -zxvf +文件名,保持几个文件都在src目录下

http://ftp.pcre.org/pub/pcre/

https://www.openssl.org/source/

http://nginx.org/en/download.html

http://zlib.net/

2.使用一下命令检查或者安装必要的环境

apt install gcc
apt install build-essential
apt install make

3. cd到 nginx目录下

./configure  --with-http_ssl_module  --with-openssl=../openssl-1.1.1k  --with-pcre=../pcre-8.42  --with-zlib=../zlib-1.2.11

4.make && make install