很多人安装编译nginx,有时候会忘记http_v2_module这个模块,当有一天我们需要的时候该怎么办呢?
因为是线上业务,为了业务不中断,使用下面的操作进行即可。
1:查看nginx版本
可以看到我就是没有安装这个模块,下面教大家如何安装这个模块
[root@localhost]# /usr/local/nginx/sbin/nginx -V
nginx version: nginx/1.18.0
built by gcc 4.7.0 20120507 (Red Hat 4.7.0-5) (GCC)
built with OpenSSL 1.0.2u 20 Dec 2019
TLS SNI support enabled
configure arguments: --user=nobody --group=nobody --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module --with-http_flv_module --with-http_mp4_module --with-http_geoip_module --with-http_realip_module --with-http_image_filter_module --with-openssl=/usr/local/openssl
2:下载nginx
下载与之相应的nginx版本
wget http://nginx.org/download/nginx-1.18.0.tar.gz
3:解压编译nginx
注意,编译完成之后,只进行make<