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