构建Apache+Tomcat+memcache集群服务器 - graybull's Blog

构建Apache+Tomcat+memcache集群服务器

graybull posted @ 2013年3月10日 00:10 in Hi-perf Web Site with tags apache http tomcat web server memcached , 2043 阅读
  • 前言
  • 安装Apache
  • 安装mod_jk.so模块(Tomcat-connectors)
  • 配置jk
  • 安装Tomcat
  • 配置Tomcat
  • 安装memcache

前言

Apache目前是世界使用量第一的Web服务器。本文将介绍如何构建一个基础的集群Web服务器。

基本功能部件

Apache -- 请求分发器,静态资源处理

Tomcat -- Java Web应用服务器

memcache -- 分布式缓存服务器

                           |------------->[Tomcat1] ---------------------|

 Request---  [Apache]                             mcache1] ------ [Memcache2]    

                           |------------->[Tomcat2]----------------------|

安装Apache

安装Apache httpd的具体过程参考: http://graybull.is-programmer.com/posts/37857.html

总之,结果是将httpd安装在目录/usr/local/apache2下。

安装mod_jk.so模块
下载tomcat-connectors: http://tomcat.apache.org/download-connectors.cgi

$ ./configuare --with-apxs=/usr/local/apache2/bin/apxs

$ make

在Apache-2.0目录下生成动态库mod_jk.so

拷贝mod_jk.so到/usr/local/apache2/modules目录;拷贝conf目录下的httpd-jk.conf 和workers.properties到/usr/local/apache2/conf目录。

 

apachectl -t -D DUMP_MODULES

ps -ef | grep tomcat

 

 <Manager className="de.javakaffee.web.msm.MemcachedBackupSessionManager"
        memcachedNodes="n1:localhost:11211,n2:localhost:11212"
        failoverNodes="n2"
        requestUriIgnorePattern=".*\.(ico|png|gif|jpg|css|js)$"
        transcoderFactoryClass="de.javakaffee.web.msm.serializer.kryo.KryoTranscoderFactory"
        />
 

 

memcache下载地址: http://memcached.org/

安装libevent

$ sudo ./configure -prefix=/usr

$sudo make

$sudo make install

 

$sudo ./configure -with-libevent=/usr

$sudo make

$sudo make install

 

未完。

Avatar_small
quickbooks help 说:
2018年9月05日 18:47

The technical support for the free quickbook users is provided for them to solve their problems for free.

Avatar_small
run 3 说:
2018年12月27日 19:59

I want you to thank for your time of this wonderful read!!! I definately enjoy every little bit of it and I have you bookmarked to check out new stuff of your blog a must read blog!

Avatar_small
remove Hotmail accou 说:
2019年6月14日 00:23

It is fantastic experience to learn how to delete Hotmail account by this site. It will easy to delete account when you visit here.
<a href="http://windowsclassroom.com/delete-microsoft-account/">delete microsoft account</a>

Avatar_small
www.walgreenslistens 说:
2019年6月27日 21:49

Walgreenslistens Survey, which is also known as the Walgreens Customer Satisfaction Survey, is mainly conducted to know the views and opinions of the customers regarding the products and service offerings.

Avatar_small
cleaning companies 说:
2019年10月12日 00:01

Within the high volume of dancing that will skirting decks and rug cleaning, we have much experience for hotel, standard, pubs, nightclub together with all-sized inns – and it's well known about the procedure you have Will to generally be the place of Hiring a good CCS to your cleaning to your hotel or simply cleaning pub will mean which you can feel boastful to receptive your doors to your paying general population.

Avatar_small
starliteshoppingmall 说:
2020年4月15日 23:58

After we talk on the subject of fashion, a brilliantly hot researching lady sets out reverberating within mind. The explanation for this might be fashion can be described as replica from beauty, cosmetic and form, that is perfect seen through women. But it will not mean who male are actually behind the fashion scene.

Avatar_small
shopping-batalha 说:
2020年4月15日 23:58

Such aquarium establishments have all stock items that you could be require that means to recognise a stunning to go anywhere else to obtain a stuff. You can actually avail all kinds of things here from the comfort of heaters, filters, lights, food last but not least fish! They also deliver stands, house plants and tanks.

Avatar_small
elimperiotravel 说:
2020年4月15日 23:59

The obvious benefit it is a flexibility in your self-planned travel and leisure holidays. Utilizing this form from travel, you are able to customize typically the self-planned travel right down to the last minute details.

Avatar_small
travelling2peru 说:
2020年4月15日 23:59

Booking traveling by plane, making conventional hotel reservations not to mention arranging holiday retreat travel as a rule has replaced completely aided by the advent of this internet a lot of people try to be their have travel products. While you can actually arrange seemingly much of your travel and leisure yourself, you simply cannot do your travel agent in any long jog!

Avatar_small
rapidity-news 说:
2020年4月15日 23:59

After we hear the concept of "Breaking News" a feeling of desperation hits a lot of our brain. Unexpectedly we beginning paying further attention. This really nothing unusual for ones human thought process. Our thought process responds towards unusual important things or events from a faster price than dealing to average events.

Avatar_small
maids in dubai 说:
2020年5月04日 02:21

House maid of reverance wedding speeches generally is a tricky for getting right. For the reason that maid connected with honor, also you can find not much time to expend preparing this speech amongst all the other wedding arrangements. In the tip, though, will probably be worth your time, as this can be a privilege so that you can speak on the part of the bride whilst your best pal.

Avatar_small
maid agency dubai 说:
2021年6月07日 19:57

Just after entering a project sent to area, cleaners decide to put their equipment and various packages inside of a fixed site, so the fact that diseases will not spread. Its cleaning approach is perfectly planned plus systematic.

Avatar_small
net worth 说:
2021年12月31日 02:56

If you are interested in your favorite actors' net worth and detailed information, please take a look at idol net worth database.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter
Host by is-Programmer.com | Power by Chito 1.3.3 beta | © 2007 LinuxGem | Design by Matthew "Agent Spork" McGee