tigase 集群配置

集群配置

直接贴配置现在2台机器,s3-1,s3-4

s3-1配置

config-type=--gen-config-def
--cluster-mode = true
--cluster-nodes = s3-1.g.com:5333,s3-4.g.com:5333
--cluster-connect-all = true

[email protected]
--virt-hosts=g.com
--debug=server,xmpp.impl,db,cluster
--monitoring=jmx:9050,http:9080,snmp:9060
--user-db=mysql
--user-db-uri=jdbc:mysql://192.168.1.15:3306/tigasedb?user=tigase&password=tigase&useUnicode=true&characterEncoding=UTF-8&autoCreateUser=true

--comp-name-1=message-archive
--comp-class-1=tigase.archive.MessageArchiveComponent

message-archive/archive-repo-uri=jdbc:mysql://192.168.1.15:3306/tigasedb?user=tigase&password=tigase&useUnicode=true&characterEncoding=UTF-8

--sm-plugins=+message-archive-xep-0136
sess-man/plugins-conf/message-archive-xep-0136/component-jid=message-archive@s3-1

sess-man/plugins-conf/message-archive-xep-0136/default-store-method=body
sess-man/plugins-conf/message-archive-xep-0136/required-store-method=body



s3-4
config-type=--gen-config-def
--cluster-mode = true
--cluster-nodes = s3-1.g.com:5333,s3-4.g.com:5333
--cluster-connect-all = true

[email protected]
--virt-hosts=g.com
--debug=server,xmpp.impl,db,cluster
--monitoring=jmx:9050,http:9080,snmp:9060
--user-db=mysql
--user-db-uri=jdbc:mysql://192.168.1.15:3306/tigasedb?user=tigase&password=tigase&useUnicode=true&characterEncoding=UTF-8&autoCreateUser=true

--comp-name-1=message-archive
--comp-class-1=tigase.archive.MessageArchiveComponent

message-archive/archive-repo-uri=jdbc:mysql://192.168.1.15:3306/tigasedb?user=tigase&password=tigase&useUnicode=true&characterEncoding=UTF-8

--sm-plugins=+message-archive-xep-0136
sess-man/plugins-conf/message-archive-xep-0136/component-jid=message-archive@s3-1

sess-man/plugins-conf/message-archive-xep-0136/default-store-method=body
sess-man/plugins-conf/message-archive-xep-0136/required-store-method=body



注意集群要通,要确保主机名能相互访问,比如ping s3-4;

特别是用的虚拟主机,如果不通可以配下host

2.修改/etc/hosts里面的名字 
# vi /etc/hosts 

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6
192.168.1.26  s3-1
192.168.1.28  s3-4



配置参考:http://www.tigase.org/content/cluster-nodes

另外如果配置“cluster port”,作用是在已有的集群里添加,新服务器的时候,已有的服务器,不用任何动作;

集群策略

默认为集群策略说明,https://projects.tigase.org/projects/tigase-server/wiki/Default_clustering_strategy;要应用的时候多看看,这个策略不是做大量用户的

另外还有个商业化组件,需要购买license(它妹的上当了)

http://www.tigase.com/content/tigase-acs-advanced-clustering-strategy

这快还没真正使用,还得在研究研究,


你可能感兴趣的:(cluster,集群,tigase)