|
升级前,查看已经安装的版本以及模块
1
2
3
4
5
| [iyunv@mail ~]# /opt/nginx/sbin/nginx -Vnginx version: nginx/0.5.34
built 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
|
修改版本号:
1
| [iyunv@ns ~/nginx-1.7.8]#vim src/core/nginx.h
|
1
2
3
4
5
6
7
8
| #define nginx_version 1007008
#define NGINX_VERSION "1.7.8"
#define NGINX_VER "nginx/" NGINX_VERSION
修改为
#define nginx_version 1007008
#define NGINX_VERSION "1.7.8"
#define NGINX_VER "Power_nginx"
|
然后重新编译:
1
2
3
4
5
6
| ./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
|
然后重新启动nginx
再查看版本及模块信息
完成了。
|
|
|
|
|
|
|