1.安装地址
Nginx官网:nginx: download
2.下载依赖
//一键安装上面四个依赖
yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-devel
3.上传解压编译安装
//解压压缩包tar -xvf nginx-1.26.1.tar.gz
//进入nginx
cd nginx-1.26.1/
//安装到指定位置
./configure --prefix=/usr/local/nginx
//编辑安装
make
make install
4.启动Nginx
//进入nginx目录
cd /usr/local/nginx/sbin
//启动nginx
./nginx