1.安装依赖项
安装openssl
sudo apt-get install openssl libssl-dev
安装pcre
sudo apt-get install libpcre3 libpcre3-dev
安装zlib
sudo apt-get install zlib1g-dev
2.将下载的linux版本nginx解压
tar -xvf nginx-1.14.2.tar.gz mv /nginx-1.14.2 nginx
3.执行配置
./configure
4.编译安装(默认安装在/usr/local/nginx)
make make install
5.启动nginx
/usr/local/nginx/sbin/nginx
6.访问nginx
http://IP:80
原文地址:https://www.cnblogs.com/suphowe/p/12349490.html
时间: 2024-10-05 17:24:26