一、系统环境 以下三台服务器均为CentOS release 5.6 x86_64为的系统 10.2.2.52 www.jv.com 网站前台 10.2.2.54 rsv.jv.com 应用服务 10.2.2.56 admin.jv.com 网站后台 二、软件版本 nginx-1.2.4.tar.gz pcre-8.31.tar.gz jdk-6u35-linux-x64-rpm.bin tomcat--6.0.35 三、安装Nginx (需要几台Nginx就要装几台) 3.1、在安装Nginx之前先要确认系统中是否已安装gcc、openssl-devel、pcre-devel、zlib-devel #yum -y install gcc openssl-devel pcre-devel zlib-devel
3.2、安装pcre-devel库(使Nginx支持http rewrite的模块) #tar zxvf pcre-8.31.tar.gz
#cd pcre-8.31
#./congigure
#make
#make install
3.3、安装Nginx
./configure --prefix=/usr/local/nginx --without-http_autoindex_module --without-http_geo_module --without-http_map_module --without-http_browser_module --with-http_stub_status_module --with-http_realip_module --with-pcre=../pcre-8.31
注意:把--with-pcre=../pcre-8.31换成你的pcre解压缩包的路径
四、安装Tomcat (需要几台Tomcat 就要装几台) 4.1、首先确认是否安装了JDK 4.2、将Tomcat的压缩包解压到您需要的目录即可。 五、配置tomcat 5.1、以admin.jv.com 网站后台为例配置 # cd /opt/zhubao/backend/conf/ # vim server.xml 在配置文件69行修改端口: -->
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" URIEncoding="UTF-8" />
<!-- A "Connector" using the shared thread pool--> 5.2、测试tomcat 六、配置Nginx 6.1、#
|