新版tigase配置文档地址有关

We are sorry you hit the missing page. If you got to this page from a search engine, please be advised we just moved to a new website and we are still working hard to resolve all issues.
If you are looking for a particular information here is where to look:



http://docs.tigase.org/tigase-server/5.3.0/adminguide/AdminGuide.pdf
http://docs.tigase.org/tigase-server/5.3.0/propertiesguide/PropertiesGuide.pdf
http://www.inter12.org/archives/879
http://docs.tigase.org/

tigase的笔记一 — 基本的配置

基本介绍

  • 1.支持字节包的替换,只需要替换/root/soft/tigase/jars下的tigase-server.jar包即可!
  • 2.支持多数据库配置: http://www.tigase.org/content/tigase-server-and-multiple-databases
  • 3.良好的系统检察:有一个简单的脚本,在script下的machine-check.sh,此外有发布,重启及停止脚本


几个主要的配置文件
1.tigase.xml tigase server的唯一配置文件,存储所有的运行时数据,若是缺失的话,会根据Init.properties文件生成一个,动态生成数据的话,可以用Ad-hoc命令。但是不推荐
2.init.properties key=value存储的格式,修改不会影响已经在运行的服务,若是动态修改的话,通过
3.tigase.conf 不是tigase本身使用,主要是操作系统一些信息,例如JAVA_HOME、JAVA_OPTIONS等信息,只有在linux系统下才有用,windows下是用wrapper.conf

一 init.properties中的详细配置

http://www.tigase.org/content/tigase-xmpp-server-configuration-properties

基本配置:
–user-db 用户数据的存储方式 –user-db = ldap
–user-db-uri 存储的具体地址 –user-db-uri = jdbc:postgresql://localhost/tigase?user=tigase
–user-domain-repo-pool 每个不同域下用户数据库连接池的实现
–user-repo-pool 用户数据库连接实现 –user-domain-repo-pool = tigase.db.UserRepositoryMDImpl
–vhost-anonymous-enabled 是否允许anonymous用户登陆,默认是true ,需要修改为false
–virt-hosts:虚拟服务器的配置
–vhost-tls-required : 是否开启tls
–script-dir 管理员脚本的存放路径
–sm-cluster-strategy-class 集群环境的使用
–test 测试模式,关闭所有的日志
–tigase-config-repo-class 读取tigase的配置方式,默认是xml,也可以自定义
–tigase-config-repo-uri 通过数据库的方式读取tigase的配置 案例:–tigase-config-repo-uri = jdbc:mysql://localhost/tigase?user=root&password=mypass
–trusted 一些可信任的账户 –trusted = user@domain.com,user-2@domain2.com
–cmpname-ports s2s之间的TCP端口地址 案例:–s2s-ports=5269,5270,5271
–data-repo-pool-size 数据访问层的数据库连接池大小 DataRepository 是一个抽象
–debug、–debug-packages 是否开启debug 案例:–debug = server,xmpp.impl –debug-packages = com.company.CustomPlugin,com.company.custom
–external 外部组件
–monitoring 监控信息,案例:–monitoring = jmx:9050,http:9080,snmp:9060 具体详见http://www.tigase.org/content/setting-remote-monitoring-server

集群部署
–config-type 决定服务器启动的是 ,最重要的一个配置 –gen-config-def|–gen-config-all|–gen-config-sm|–gen-config-cs|–gen-config-comp

  • 1)–gen-config-all:会话管理、c2s连接管理,s2s连接管理,一个额外组件连接管理、节点发送、节点接受
  • 2)–gen-config-def:会话管理、c2s连接管理,s2s连接管理
  • 3)–gen-config-sm:会话管理,一个额外组件连接管理
  • 4)–gen-config-cs:c2s’, ‘s2s’, ‘ext2s’ 适合分布式系统
  • 5)–gen-config-comp:只有一个额外组件的管理

–cluster-connect-all 新增节点时候是否自动建立已经在–cluster-nodes中的节点,默认是false,若是集群部署可以修改为true –cluster-connect-all = true
–cluster-mode 是否集群模式 案例:–cluster-mode=true
–cluster-nodes 集群部署信息 案例 –cluster-nodes = node1.domain,node2.domain,node3.domain 。 不同机器间必须能够互相解析对方的DNS地址
–client-access-policy-file 客户端的访问策略,是否允许跨域访问,默认配置文件是etc/client-access-policy.xml
–cross-domain-policy-file 跨域访问策略 默认是在etc/cross-domain-policy.xml
–cm-see-other-host 是否允许查看其它节点,默认实现是–cm-see-other-host=tigase.server.xmppclient.SeeOtherHostHashed,需要同Tigase Load Balancing配合使用
–domain-filter-policy 不同域下的用户是否可以进行通信,默认是ALL ,运行在不同子域下通信

安全:
–bosh-close-connection 是否在数据传递后关闭连接 默认是false,不需要去修改
–bosh-extra-headers-file 一些额外头信息的控制 详细见:http://www.tigase.org/content/bosh-extra-headers-file
性能优化:
–net-buff-high-throughput 高吞吐量下的网络缓存区大小 默认64k, 案例–net-buff-high-throughput = 256k
–net-buff-standard 标准情况下缓存区大小,默认是2K,
–new-connections-throttling 每秒连接到指定端口的并发数 默认5222:200,5223:50,5269:100,5280:1000,案例:–new-connections-throttling = 5222:100
–nonpriority-queue 是否启动无优先级队列 ,导致的后果会导致消息的乱序,但是对同一个用户的消息不回乱序
–queue-implementation 队列的实现,默认是tigase.util.PriorityQueueRelaxed

  • 1)tigase.util.PriorityQueueRelaxed – 非要改的优先级队列,有较高的性能
  • 2)tigase.util.PriorityQueueStrict – 严格的优先级队列,性能比不上PriorityQueueRelaxed
  • 3)tigase.util.NonpriorityQueue – 无优先级队列

–max-queue-size 队列的最大长度 案例:–max-queue-size=10000
–cm-traffic-throttling 客户端和服务端节点间的控制c2s 具体解析同–cm-ht-traffic-throttling
–cm-ht-traffic-throttling 服务节点间的流量控制s2s 案例:–cm-ht-traffic-throttling = xmpp:25k:0:disc,bin:200m:0:disc
[xmpp|bin]:协议类型 xmpp协议和二进制流数据
[25k|200m]:每分钟最大的传输个数,0代表没有限制
0:每次连接传输的数据大小,0代表没有限制
[disc|drop]:对于超过的数据采取什么策略,disc是断开连接,drop是放弃数据

–vhost-max-users 单个虚拟节点的最大用户数,若是0,无限制
–elements-number-limit 最大连接数 案例:–elements-number-limit=20000

扩展:
–comp-name 定义那些非config-type指定的服务,命名而已 案例:–comp-name-1 = muc 同–comp-class配合使用
–comp-class 加载的其他服务 案例:–comp-class-1 = tigase.muc.MUCComponent

其他配置见:http://www.tigase.org/content/tigase-xmpp-server-configuration-properties
二 tigase.conf配置
JAVA_HOME:JDK地址
TIGASE_HOME:本身的部署地址
TIGASE_CONSOLE_LOG:日志存放地址,默认是在 TIGASE_HOME/logs/tigase-console.log
TIGASE_PID :PID的存放路径 :TIGASE_HOME/logs/tigase.pid
TIGASE_CONFIG:配置文件存放路径
JAVA_OPTIONS  :JVM的一些参数设置
TIGASE_OPTIONS:一些其他配置

示例:
ENC=”-Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8″
DRV=”-Djdbc.drivers=org.postgresql.Driver”
JAVA_OPTIONS=”${ENC} ${DRV} -server -Xms100M -Xmx100M ”
CLASSPATH=”"
TIGASE_CONFIG=”tigase-pgsql.xml”
TIGASE_OPTIONS=” –property-file etc/init.properties ”

主要的表结构:
Tables_in_tigasedb |
+————————–+
| cluster_nodes | –
| msg_history | –
| muc_history | –
| short_news |
| tig_ma_jids |
| tig_ma_msgs |
| tig_nodes |
| tig_pairs |
| tig_pubsub_affiliations |
| tig_pubsub_items |
| tig_pubsub_jids |
| tig_pubsub_nodes |
| tig_pubsub_service_jids |
| tig_pubsub_subscriptions |
| tig_socks5_connections |
| tig_socks5_users |
| tig_users | –注册用户信息
| user_jid |
| xmpp_stanza |

tips:
操作系统的调优:

http://www.tigase.org/content/linux-settings-high-load-systems

我们现在线上服务器的配置:
#ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 30640
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 102400
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 1024000
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值