介绍
官网 https://nginx.org/en/download.html
在安装nginx前首先要确认系统中安装了gcc、pcre-devel、zlib-devel、openssl-devel
linux 检查是否安装过某软件包
yum -y install gcc pcre-devel zlib-devel openssl openssl-devel
#下载
wget https://nginx.org/download/nginx-1.19.5.tar.gz# 解压
tar -zxvf nginx-1.19.5.tar.gz#进入nginx目录
cd nginx-1.19.5# 配置
./configure # make
make && make install#测试是否安装成功
cd /usr/local/nginx/./sbin/nginx –t#启动nginx
cd /usr/local/nginx/sbin./nginx