`
AILIKES
  • 浏览: 177993 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

quartz系列terracotta详细安装教程

阅读更多

【概述】 
官方网站 
http://terracotta.org/ 
http://www.quartz-scheduler.org/documentation/quartz-2.1.x/configuration/ConfigTerracottaJobStore 

下载 
http://terracotta.org/downloads/open-source/catalog 
点击左边的opensource /download 

与maven集成 
http://terracotta.org/documentation/more/apache-maven 
http://repo.terracotta.org/maven2/ 

【在java客户端使用quartz集群时】 
问题一 
Caused by: java.lang.NoClassDefFoundError: org/terracotta/express/ClientFactory 
把common目录下的terracotta-toolkit-1.0-runtime-1.0.0.jar文件拷贝到classpath就可以了。 

问题二 
terracotta客户端与com.googlecode.jmockit的JAR包不能一起使用,否则报错 

【安装】 
1)切记使用JDK1.6,使用1.7会报错 
2)解压缩以后,根据习惯,创见子目录 
run 存放起停shell脚本 
etc 存放配置文件tc-config.xml 

【terracotta集群配置】tc-config.xml 
<?xml version="1.0" encoding="UTF-8"?> 
<!-- All content copyright Terracotta, Inc., unless otherwise indicated.      All rights reserved. --> 
<tc:tc-config xsi:schemaLocation="http://www.terracotta.org/schema/terracotta-5.xsd" 
xmlns:tc="http://www.terracotta.org/config" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 
  <servers> 
    <!-- Sets where the Terracotta server can be found. Replace the value of          host with the server's IP address. --> 
     <!-- %(user.home) --> 
    <server host="10.10.224.27" name="Server1"> 
      <data>/data0/search/terracotta/server-data</data> 
      <logs>/data0/search/terracotta/server-logs</logs> 
    </server> 
    <!-- If using a standby Terracotta server, also referred to as an ACTIVE-PASSIVE configuration, add the second server here. --> 
    <server host="10.10.224.59" name="Server2"> 
      <data>/data0/search/terracotta/server-data</data> 
      <logs>/data0/search/terracotta/server-logs</logs> 
    </server> 
<!-- If using more than one server, add an <ha> section. --> 
    <ha> 
       <mode>networked-active-passive</mode> 
       <networked-active-passive> 
               <election-time>5</election-time> 
       </networked-active-passive> 
    </ha> 
  </servers> 
  <!-- Sets where the generated client logs are saved on clients. --> 
  <clients> 
    <logs>/data0/search/terracotta/client-logs</logs> 
  </clients> 
</tc:tc-config> 

【服务器启动】 
主服务器 
sh start-tc-server.sh -f /application/search/terracotta-3.7.5/tc-config.xml -n server1 & 
备服务器 
sh start-tc-server.sh -f /application/search/terracotta-3.7.5/tc-config.xml -n server2 & 

【客户端监控】 
跟服务器的包是一样的包 
启动的是dev-console.bat 

【参考】 
http://baike.baidu.com/view/4595391.htm 
http://lihongchao87.iteye.com/blog/1727802 
http://yale.iteye.com/blog/1560539 
原理分析 
http://yale.iteye.com/blog/1541612 
quartz访问terracotta集群 
http://blog.csdn.net/privatemiao/article/details/6558794 

配置说明 
http://1730634.blog.51cto.com/blog/1720634/1007496 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics