子敬正在创造自己的人生
需求有轻重缓急,功能有可控不可控。 需求有版本有截止(否则会无休无止),功能不可控变为可控。 集中兵力消灭敌人有生力量,集中优势兵力消灭敌人有生力量。

前提条件

安装gcc,gcc-c++两个编译器

yum install gcc
yum install gcc-c++

  

接下来开始安装集群相关环境:

1、下载apr,apr-util,pcre,apache(httpd),tomcat-connector

可通过yum下载安装

2、安装apr,apr-util,pcre

(1)安装apr

tar -zxvf apr-xxxxx.tar.bz

  

cd apr-xxxx
./configure --prefix=/usr/local/apr
make
make install

(2)安装apr-util

tar -zxvf apr-util-xxxxx.tar.bz

  

cd apr-util-xxxx
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make
make install

(3)安装pcre

tar -zxvf pcre-xxxxx.tar.bz

  

cd pcre-xxxx
./configure --prefix=/usr/local/pcre
make
make install

3、编译apache并安装

编译命令如下:

./configure --with-mpm=worker --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre --prefix=/usr/local/apache2

 

  

make
make install

 

4、安装tomcat-connector

./configure --with-apxs=/usr/local/httpd安装目录/bin/apxs

  

make
make install

  

教程如下:

http://blog.csdn.net/gtuu0123/article/details/5814475

 

 

5、tomcat配置集群

(1)配置httpd安装包中的conf/httpd.conf 中的ServerName=域名

(2)http://www.blogjava.net/pengo/archive/2011/04/15/348331.html

 

6、到httpd的安装路径下的bin目录下运行

 ./apachectl -k start

7、查询apache进程

 ps -ef | grep httpd

kill-9 pid

  

静态分离

  http://heylinux.com/archives/1769.html
posted on 2015-01-06 21:19  silentjesse  阅读(156)  评论(0编辑  收藏  举报