解压各个模块,在安装nginx时,加入该模块
# unzip nginx_upstream_jvm_route.zip //tomcat session
Archive: nginx_upstream_jvm_route.zip
creating: nginx-upstream-jvm-route/
creating: nginx-upstream-jvm-route/nginx_upstream_jvm_route/
inflating: nginx-upstream-jvm-route/nginx_upstream_jvm_route/CHANGES
inflating: nginx-upstream-jvm-route/nginx_upstream_jvm_route/config
inflating: nginx-upstream-jvm-route/nginx_upstream_jvm_route/jvm_route.patch //补丁文件,需要手工进行执行
inflating: nginx-upstream-jvm-route/nginx_upstream_jvm_route/ngx_http_upstream_jvm_route_module.c
inflating: nginx-upstream-jvm-route/nginx_upstream_jvm_route/README
# unzip master.zip //nginx_upsteam check_module
# tar -xzf nginx-sticky-module-1.1.tar.gz //session
# tar -xzf nginx-1.2.6.tar.gz
# cd nginx-1.2.6
开始打补丁了
# patch -p0 < /root/upgrade/nginx-upstream-jvm-route/nginx_upstream_jvm_route/jvm_route.patch
patching file src/http/ngx_http_upstream.c
Hunk #1 succeeded at 4117 (offset 380 lines).
Hunk #3 succeeded at 4249 (offset 380 lines).
Hunk #5 succeeded at 4348 (offset 380 lines).
patching file src/http/ngx_http_upstream.h
Hunk #1 succeeded at 90 (offset 5 lines).
Hunk #3 succeeded at 118 (offset 5 lines).
# patch -p1 < /root/upgrade/nginx_upstream_check_module-master/check_1.2.6+.patch
patching file src/http/modules/ngx_http_upstream_ip_hash_module.c
patching file src/http/modules/ngx_http_upstream_least_conn_module.c
patching file src/http/ngx_http_upstream_round_robin.c
patching file src/http/ngx_http_upstream_round_robin.h
# ./configure --prefix=/usr/local/nginx --user=nobody --group=nobody --with-http_stub_status_module --with-http_gzip_static_module --with-http_realip_module --with-http_sub_module --with-http_geoip_module --with-http_ssl_module --with-http_ssl_module --with-openssl=/root/upgrade/openssl-1.0.1c --with-pcre=/root/upgrade/pcre-8.12 --add-module=/root/upgrade/nginx-upstream-jvm-route/nginx_upstream_jvm_route/ --add-module=/root/upgrade/nginx_upstream_check_module-master/ --add-module=/root/upgrade/nginx-sticky-module-1.1/ --with-google_perftools_module
# make && make install
# /usr/local/nginx/sbin/nginx -v
nginx version: nginx/1.2.6