1、下载 Nginx 安装源码
下载地址:https://nginx.org/en/download.html
2、解压安装包
tar zxvf nginx-1.27.3.tar.gz
3、编译安装nginx
cd nginx-1.27.3
./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module
make
cp ./objs/nginx /usr/local/nginx/sbin/