Nginx 标签

Nginx+Tomcat实现负载均衡集群

  |   0 评论   |   1,086 浏览

1.前期准备工作 1.1 安装 Nginx安装 Tomcat安装 1.2 copy两份tomcat [root@localhost tomcat]# mkdir /usr/local/tomcat/tomcat9001 [root@localhost tomcat]# mkdir /usr/local/tomcat/tomcat9002 [root@localhost tomcat]# cp -Rf /usr/local/tomcat/apache-tomcat-8.0.49/* /usr/local/tomcat/tomcat9002 [root@localhost tomcat]# cp -Rf /usr/local/tomcat/apache-tomcat-8.0.49/* /usr/local/tomcat/tomcat9001 2.修改tomcat端口 [root@localhost tomcat]# vi tomcat9001/conf/server.xml <Server port="18005" shutdown="SHUTDOWN"> //9001tom....

CentOS安装Nginx

  |   0 评论   |   457 浏览

1.安装编译工具和库文件 [root@localhost /]# yum -y install make zlib zlib-devel gcc-c++ libtool openssl  2.安装pcre 让nginx支持Rewrite 2.1下载 [root@localhost /]# wget http://downloads.sourceforge.net/project/pcre/pcre/8.35/pcre-8.35.tar.gz 2.2 解压 [root@localhost /]# tar zxvf pcre-8.35.tar.gz 2.3编译安装 [root@localhost pcre-8.35]# ./configure [root@localhost pcre-8.35]# make && make install 3.安装nginx 3.1下载 [root@localhost /]# wget http://nginx.org/download/nginx-1.6.2.tar.gz 3.2解压 [root@localhost /....