Review the installed versions and modules before upgrading
[[email protected] ~]# /opt/nginx/sbin/nginx -vnginx version: nginx/0.5.34built by gcc 3.4.6 20060404 (red hat 3.4.6-3) configure arguments: -- prefix=/opt/nginx --sbin-path=/opt/nginx/sbin/nginx --conf-path=/opt/nginx/conf/nginx.conf -- Pid-path=/var/run/nginx/nginx.pid --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log /nginx/access.log --http-proxy-temp-path=/opt/nginx/temp/proxy --http-fastcgi-temp-path=/opt/nginx/ Temp/fcgi --lock-path=/var/run/nginx/nginx.lock --with-http_ssl_module --with-http_sub_module --with-http_stub_status_module --with-debug
To modify the version number:
[[email protected] ~/nginx-1.7.8] #vim src/core/nginx.h
#define Nginx_version 1007008#define nginx_version "1.7.8" #define Nginx_ver "nginx/" nginx_version modified to #d Efine nginx_version 1007008#define nginx_version "1.7.8" #define Nginx_ver "Power_nginx"
And then recompile:
./configure--prefix=/opt/nginx \--sbin-path=/opt/nginx/sbin/nginx \--conf-path=/opt/nginx/conf/nginx.conf \-- Pid-path=/var/run/nginx/nginx.pid \--error-log-path=/var/log/nginx/error.log \--http-log-path=/var/log/nginx/ Access.log \--http-proxy-temp-path=/opt/nginx/temp/proxy \--http-fastcgi-temp-path=/opt/nginx/temp/fcgi \-- Lock-path=/var/run/nginx/nginx.lock--with-http_ssl_module--with-http_sub_module--with-http_gzip_static_module- -with-http_stub_status_module--with-http_flv_module \--with-debug
Make && make install
Then restart the Nginx
Service Nginx Restart
View version and module information again
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/57/81/wKiom1Sb9Gyxn78HAAGpcMsdVa0164.jpg "title=" 1.png " alt= "Wkiom1sb9gyxn78haagpcmsdva0164.jpg"/>
It's done.
This article is from the "Professor" blog, please be sure to keep this source http://professor.blog.51cto.com/996189/1596058
Upgrade Nginx, view the installed modules, and hide or modify the version number