下载:
wget http://nginx.org/download/nginx-1.24.0.tar.gz
解压缩包:
tar zxf nginx-1.24.0.tar.gz
进入源码目录:
cd nginx-1.24.0
编译安装:
./configure --prefix=/usr/local/nginx --user=test --group=test --with-threads --with-http_ssl_module --with-http_v2_module && make && make install
安装过程中可能出现的报错:
./configure: error: the HTTP rewrite module requires the PCRE library.
解决方法:
apt install libpcre3-dev