1.安装相关依赖
yum -y install gcc gcc-c++ automake pcre pcre-devel zlib zlib-devel openssl-devel
2.下载nginx
wget http://nginx.org/download/nginx-1.22.1.tar.gz
3.解压ng包
tar -zxvf nginx-1.22.1.tar.gz
4.进入目录
cd nginx-1.22.1
5.编译
./configure --with-http_ssl_module --with-stream
6.安装
make && make install
7.启动
//进入 /usr/local/nginx/sbin 执行
./nginx
8.访问