日期:2014-05-16  浏览次数:20683 次

RedHat Linux AS 5下Nginx的安装及Nginx+Tomcat负载均衡配置

一、软件准备

zlib-1.2.5.tar.gz[支持gzip],下载地址:http://www.zlib.net/

pcre-8.10.tar.gz[支持rewrite module],下载地址:http://sourceforge.net/projects/pcre/files/

openssl-1.0.0a.tar.tar[支持ssl],下载地址:http://www.openssl.org/source/

下载LATEST版本

nginx-0.8.53.tar.gz,下载地址:http://nginx.org/en/download.html

二、安装过程

由于ssl暂时没有用到,所以没有安装

1、解压缩相关软件

[root@localhost tools]# tar zxvf zlib-1.2.5.tar.gz

[root@localhost tools]# tar zxvf pcre-8.10.tar.gz

[root@localhost tools]# tar zxvf nginx-0.8.53.tar.gz

2、具体安装

[root@localhost tools]# cd nginx-0.8.53

[root@localhost nginx-0.8.53]# ./configure --prefix=/opt/nginx

--with-http_realip_module --with-http_sub_module --with-http_flv_module

--with-http_dav_module –with-http_gzip_static_module --with-http_stub_status_module

--with-http_addition_module --with-pcre=/opt/tools/pcre-8.10 --with-zlib=/opt/tools/zlib-1.2.5

[root@localhost nginx-0.8.53]#make

[root@localhost nginx-0.8.53]#make install

三、Nginx+Tomcat<