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

linux安装tigase

 
阅读更多

1  下载安装包

https://projects.tigase.org/projects/tigase-server/files

从中选一个,我这边选的是  tigase-server-5.1.0-beta2-b2555.tar.gz 

 

2  上传到linux服务器,解压

tar -zxvf tigase-server-5.1.0-beta2-b2555.tar.gz

 

3  进入 tigase目录  

cd tigase-server-5.1.0-beta2-b2555

 

4  赋予权限

chmod u+x ./scripts/tigase.sh

chmod u+x ./scripts/db-create-mysql.sh

 

5  设置JAVA_HOME

vi etc/tigase.conf

将 JAVA_HOME 设置下JAVA_HOME="${JAVA_HOME}"

保存退出

 

6  设置初始化配置文件

vi etc/init.properties

 

config-type=--gen-config-def

--admins=admin@tt.com

--virt-hosts =tt.com

--debug=server

--monitoring=jmx:9050,http:9080,snmp:9060

--user-db=mysql

--user-db-uri=jdbc:mysql://127.0.0.1:3306/tigasedb?user=root&password=111111&useUnicode=true&characterEncoding=UTF-8

 

--comp-name-1 = muc

--comp-class-1 = tigase.muc.MUCComponent

--comp-name-2 = pubsub

--comp-class-2 = tigase.pubsub.PubSubComponent

 

以上是例子

保存退出

 

7  初始化数据库

 

 ./scripts/db-create-mysql.sh database/mysql-installer-create-db.sql 111111 tigasedb root e4b3k7y8-123 localhost


参数分别是   <未知>  <数据库名>  <数据库用户名>  <数据库密码>  <数据库地址>

 

8  启动tigase服务器

./scripts/tigase.sh start etc/tigase.conf

 

期间可能会出现以下情况

 

tigase.db.DBInitException: Problem initializing jdbc connection: null

        at tigase.db.jdbc.JDBCRepository.initRepository(JDBCRepository.java:828)

        at tigase.db.RepositoryFactory.getUserRepository(RepositoryFactory.java:318)

        at tigase.server.xmppsession.SessionManager.setProperties(SessionManager.java:678)

        at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:880)

        at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:218)

        at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:71)

        at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:115)

        at tigase.server.MessageRouter.addComponent(MessageRouter.java:131)

        at tigase.server.MessageRouter.addRouter(MessageRouter.java:171)

        at tigase.server.MessageRouter.setProperties(MessageRouter.java:697)

        at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:880)

        at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:218)

        at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:71)

        at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:115)

        at tigase.server.MessageRouter.addRegistrator(MessageRouter.java:157)

        at tigase.server.MessageRouter.setConfig(MessageRouter.java:603)

        at tigase.server.XMPPServer.main(XMPPServer.java:135)

Caused by: java.lang.NullPointerException

        at tigase.db.jdbc.JDBCRepository.initRepository(JDBCRepository.java:784)

        at tigase.db.RepositoryFactory.getUserRepository(RepositoryFactory.java:318)

        at tigase.server.xmppsession.SessionManager.setProperties(SessionManager.java:678)

        at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:880)

        at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:218)

        at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:71)

        at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:115)

        at tigase.server.MessageRouter.addComponent(MessageRouter.java:131)

        at tigase.server.MessageRouter.addRouter(MessageRouter.java:171)

        at tigase.server.MessageRouter.setProperties(MessageRouter.java:697)

        at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:880)

        at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:218)

        at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:71)

        at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:115)

        at tigase.server.MessageRouter.addRegistrator(MessageRouter.java:157)

        at tigase.server.MessageRouter.setConfig(MessageRouter.java:603)

        at tigase.server.XMPPServer.main(XMPPServer.java:135)


查看了下资料,可能是mysql权限的问题,需要执行以下操作

登陆mysql ,执行

mysql -u root -p passwod 

mysql >grant all privileges on *.* to root@"%" identified by "Passwd"

mysql >flush privileges;

 

执行

./scripts/tigase.sh restart etc/tigase.conf

然后用spark注册连接吧,应该没问题了

 

分享到:
评论
2 楼 wander_bird 2015-12-07  
楼主,知道tigase怎样支持中文消息吗?
1 楼 txgcwm 2012-10-31  
楼主,你好!
按照上面的方法安装了服务器,当使用spark去注册的时候却不能成功,请问这是为什么?

etc/init.properties配置:
config-type=--gen-config-def
--admins=admin@txgcwm-laptop
--virt-hosts =txgcwm-laptop
--debug=server,xmpp.XMPPIOService,net,cluster
--monitoring=jmx:9050,http:9080,snmp:9060
--user-db=mysql
--user-db-uri=jdbc:mysql://127.0.0.1:3306/tigasedb?user=root&password=root&useUnicode=true&characterEncoding=UTF-8

--comp-name-1 = muc
--comp-class-1 = tigase.muc.MUCComponent
--comp-name-2 = pubsub
--comp-class-2 = tigase.pubsub.PubSubComponent


etc/tigase.conf配置:
ENC="-Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8"
DRV="-Djdbc.drivers=com.mysql.jdbc.Driver:org.postgresql.Driver:org.apache.derby.jdbc.EmbeddedDriver"
#GC="-XX:+UseBiasedLocking -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:ParallelCMSThreads=2 -XX:-ReduceInitialCardMarks"
#EX="-XX:+OptimizeStringConcat -XX:+DoEscapeAnalysis -XX:+UseNUMA"
JAVA_HOME="${JAVA_HOME}"
CLASSPATH=""
JAVA_OPTIONS="${GC} ${EX} ${ENC} ${DRV} -server -Xms100M -Xmx200M -XX:PermSize=32m -XX:MaxPermSize=256m -XX:MaxDirectMemorySize=128m "
TIGASE_CONFIG="etc/tigase.xml"
TIGASE_OPTIONS=" --property-file etc/init.properties "



出错的debug信息:
2012-10-31 15:33:11  ConnectionOpenThread.run()          FINEST:   OP_ACCEPT
2012-10-31 15:33:11  ConnectionOpenThread.run()          FINER:    Registered new client socket: java.nio.channels.SocketChannel[connected local=/127.0.0.1:5222 remote=/127.0.0.1:60331]
2012-10-31 15:33:11  ConnectionManager$ConnectionListenerImpl.accept()  FINEST: Accept called for service: null@null
2012-10-31 15:33:11  ConnectionManager.serviceStarted()  FINER:    [[c2s]] Connection started: null, type: accept, Socket: nullSocket[addr=/127.0.0.1,port=60331,localport=5222]
2012-10-31 15:33:11  SocketThread.addSocketServicePriv()  FINEST:  Adding to waiting: c2s@txgcwm-laptop/127.0.0.1_5222_127.0.0.1_60331, type: accept, Socket: c2s@txgcwm-laptop/127.0.0.1_5222_127.0.0.1_60331 Socket[addr=/127.0.0.1,port=60331,localport=5222]
2012-10-31 15:33:11  SocketThread.run()                  FINEST:   Selector AWAKE: sun.nio.ch.EPollSelectorImpl@1d9d55b
2012-10-31 15:33:11  SocketThread.addAllWaiting()        FINEST:   waiting.size(): 1
2012-10-31 15:33:11  SocketThread.addAllWaiting()        FINEST:   ADDED OP_READ: 127.0.0.1_5222_127.0.0.1_60331
2012-10-31 15:33:11  SocketThread.run()                  FINEST:   Selector AWAKE: sun.nio.ch.EPollSelectorImpl@1d9d55b
2012-10-31 15:33:11  SocketThread.run()                  FINEST:   AWAKEN: 127.0.0.1_5222_127.0.0.1_60331, ready for READING, readyOps() = 1
2012-10-31 15:33:11  SocketThread.addAllWaiting()        FINEST:   waiting.size(): 0
2012-10-31 15:33:11  IOService.isConnected()             FINEST:   Socket: c2s@txgcwm-laptop/127.0.0.1_5222_127.0.0.1_60331 Socket[addr=/127.0.0.1,port=60331,localport=5222], Connected: true, id: c2s@txgcwm-laptop/127.0.0.1_5222_127.0.0.1_60331
2012-10-31 15:33:11  IOService.readData()                FINEST:   Socket: c2s@txgcwm-laptop/127.0.0.1_5222_127.0.0.1_60331 Socket[addr=/127.0.0.1,port=60331,localport=5222], Reading network binary data: 114
2012-10-31 15:33:11  IOService.readData()                FINEST:   Socket: c2s@txgcwm-laptop/127.0.0.1_5222_127.0.0.1_60331 Socket[addr=/127.0.0.1,port=60331,localport=5222], Decoded character data: <stream:stream to="127.0.0.1" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" version="1.0">
2012-10-31 15:33:11  IOService.isConnected()             FINEST:   Socket: c2s@txgcwm-laptop/127.0.0.1_5222_127.0.0.1_60331 Socket[addr=/127.0.0.1,port=60331,localport=5222], Connected: true, id: c2s@txgcwm-laptop/127.0.0.1_5222_127.0.0.1_60331
2012-10-31 15:33:11  XMPPIOService.processSocketData()   FINEST:   c2s@txgcwm-laptop/127.0.0.1_5222_127.0.0.1_60331, type: accept, Socket: c2s@txgcwm-laptop/127.0.0.1_5222_127.0.0.1_60331 Socket[addr=/127.0.0.1,port=60331,localport=5222], READ:
<stream:stream to="127.0.0.1" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" version="1.0">
2012-10-31 15:33:11  ClientConnectionManager.xmppStreamOpened()  FINER: Stream opened: {xmlns:stream=http://etherx.jabber.org/streams, to=127.0.0.1, xmlns=jabber:client, version=1.0}
2012-10-31 15:33:11  XMPPIOService.xmppStreamOpened()    FINEST:   c2s@txgcwm-laptop/127.0.0.1_5222_127.0.0.1_60331, type: accept, Socket: c2s@txgcwm-laptop/127.0.0.1_5222_127.0.0.1_60331 Socket[addr=/127.0.0.1,port=60331,localport=5222], Sending data: <?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='tigase-error-tigase' from='txgcwm-laptop' version='1.0' xml:lang='en'><stream:error><host-unknown xmlns='urn:ietf:params:xml:ns:xmpp-streams'/></stream:error></stream:stream>
2012-10-31 15:33:11  IOService.writeData()               FINEST:   Socket: c2s@txgcwm-laptop/127.0.0.1_5222_127.0.0.1_60331 Socket[addr=/127.0.0.1,port=60331,localport=5222], Writing data: 284
2012-10-31 15:33:11  IOService.writeData()               FINEST:   Socket: c2s@txgcwm-laptop/127.0.0.1_5222_127.0.0.1_60331 Socket[addr=/127.0.0.1,port=60331,localport=5222], wrote: 284
2012-10-31 15:33:11  IOService.forceStop()               FINER:    Socket: c2s@txgcwm-laptop/127.0.0.1_5222_127.0.0.1_60331 Socket[addr=/127.0.0.1,port=60331,localport=5222], Force stop called...
2012-10-31 15:33:11  IOService.forceStop()               FINER:    Calling stop on: c2s@txgcwm-laptop/127.0.0.1_5222_127.0.0.1_60331 Socket[addr=/127.0.0.1,port=60331,localport=5222]
2012-10-31 15:33:11  IOService.forceStop()               FINER:    Calling stop on the listener: tigase.server.xmppclient.ClientConnectionManager@d51a54
2012-10-31 15:33:11  ConnectionManager.serviceStopped()  FINER:    [[c2s]] Connection stopped: c2s@txgcwm-laptop/127.0.0.1_5222_127.0.0.1_60331, type: accept, Socket: c2s@txgcwm-laptop/127.0.0.1_5222_127.0.0.1_60331 Socket[unconnected]
2012-10-31 15:33:11  ClientConnectionManager.xmppStreamClosed()  FINER: Stream closed: c2s@txgcwm-laptop/127.0.0.1_5222_127.0.0.1_60331
2012-10-31 15:33:11  IOService.readData()                FINEST:   Socket: c2s@txgcwm-laptop/127.0.0.1_5222_127.0.0.1_60331 Socket[unconnected], Exception reading data
java.nio.channels.ClosedChannelException
at sun.nio.ch.SocketChannelImpl.ensureReadOpen(SocketChannelImpl.java:131)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:174)
at tigase.io.SocketIO.read(SocketIO.java:210)
at tigase.net.IOService.readData(IOService.java:756)
at tigase.xmpp.XMPPIOService.processSocketData(XMPPIOService.java:417)
at tigase.net.IOService.call(IOService.java:235)
at tigase.net.IOService.call(IOService.java:87)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)
2012-10-31 15:33:11  IOService.forceStop()               FINER:    Socket: c2s@txgcwm-laptop/127.0.0.1_5222_127.0.0.1_60331 Socket[unconnected], Force stop called...
2012-10-31 15:33:11  IOService.forceStop()               FINER:    Service listener is null: c2s@txgcwm-laptop/127.0.0.1_5222_127.0.0.1_60331 Socket[unconnected]
2012-10-31 15:33:11  IOService.isConnected()             FINEST:   Socket: c2s@txgcwm-laptop/127.0.0.1_5222_127.0.0.1_60331 Socket[unconnected], Connected: false, id: c2s@txgcwm-laptop/127.0.0.1_5222_127.0.0.1_60331
2012-10-31 15:33:11  IOService.isConnected()             FINEST:   Socket: c2s@txgcwm-laptop/127.0.0.1_5222_127.0.0.1_60331 Socket[unconnected], Connected: false, id: c2s@txgcwm-laptop/127.0.0.1_5222_127.0.0.1_60331
2012-10-31 15:33:11  SocketThread$ResultsListener.run()  FINEST:   REMOVED: 127.0.0.1_5222_127.0.0.1_60331
2012-10-31 15:46:48  MonitorRuntime$MainShutdownThread.run()  WARNING: ShutdownThread started...

相关推荐

    Tigase Server 7.0.1 源代码

    《Tigase Server 7.0.1 源代码详解》 Tigase Server,作为一款基于Java语言开发的轻量级、可伸缩的Jabber/XMPP服务器,自诞生以来就以其高效能和高并发能力受到业界的广泛关注。在7.0.1版本中,Tigase Server继续...

    XMPP_tigase_IM服务部署安装

    3. **Tigase Server安装**:Tigase提供了多种安装方式,包括Windows下的EXE安装包、JAR文件以及Linux下的压缩包。用户可以根据自己的操作系统选择合适的安装方式。 - **EXE安装**:适用于Windows环境,安装过程...

    linux XMPP服务器 tigase 8.0 (STABLE)

    Tigase是一个实现了XMPP协议的服务器,可以用来构建自己的即时通信服务。XMPP(Extensible Messaging and Presence Protocol,前称Jabber)是一种以XML为基础的开放式实时通信协议,是经由互联网工程工作小组(IETF...

    tigase-local

    **二、Tigase安装** 1. **系统要求**:Tigase可以在多种操作系统上运行,包括Linux、Windows和macOS。确保你的系统满足Java运行环境的要求。 2. **下载**:访问Tigase官方网站下载最新版本的Tigase服务器软件包。 ...

    tigase快速配置

    在本文中,我们将深入探讨如何在Linux系统下快速配置和部署Tigase服务器,以帮助您搭建自己的即时通讯平台。 首先,让我们了解Tigase的基本概念。Tigase是一个用Java编写的跨平台服务器,它支持多种协议,包括XMPP...

    tigase monitor配置

    首先,确保你已安装了Java Development Kit (JDK) 1.7或更高版本,因为这是运行Tigase Monitor所必需的环境。接下来,通过以下步骤来获取并配置Tigase Monitor项目: 1. 使用Git克隆Tigase Monitor的源代码仓库: ...

    tigase-server-8.0.0-b10083-dist-max.zip

    Tigase服务器依赖Java,因此必须先安装。 2. **解压文件**:使用`unzip`命令将下载的“tigase-server-8.0.0-b10083-dist-max.zip”解压到一个合适的目录,例如 `/opt/tigase`。 3. **配置Tigase**:进入解压后的...

    tigase-server-8.0.0-b10083-dist-max.tar.gz

    Tigase 8.0 是一款强大的开源即时通讯(IM)服务器软件,适用于Linux操作系统。这个名为“tigase-server-8.0.0-b10083-dist-max.tar.gz”的压缩包,包含了构建和运行Tigase服务器所需的所有核心组件和资源,为开发者...

    myTigaseManager:tigase管理员

    2. **Java编程**:MyTigaseManager是用Java语言开发的,这意味着它可以跨多个操作系统平台运行,包括Windows、Linux和macOS。Java的平台无关性使得这个工具具有广泛的适用性。 3. **即时通讯协议**:XMPP...

    Java_Chat:基于smackAPI开发的IM命令行客户端,使用类似于Linux的目录结构,服务器为tigase。 开发语言为Java,可将项目编译成jar文件,运行在Java 虚拟机中

    要运行Java_Chat,首先需要具备一定的Java环境,确保已经安装了Java Development Kit (JDK)。然后,用户可以克隆或下载这个名为"Java_Chat-master"的压缩包文件。解压后,项目包含源代码和其他相关资源。开发者可以...

    视酷服务端安装部署文档

    - 各组件的安装步骤与Linux系统类似,包括MongoDB、Redis、Jdk、Spring-boot-imapi、Tigase、Upload文件上传服务。不过,由于Windows环境的差异,安装包和具体操作步骤可能有所不同。 二、详细说明 1. MongoDB的...

    psi-0.15-rc2-win64-setup.zip

    psi-0.15-rc2-win64-setup.zip文件包含了Windows版本的安装程序和用户手册,用户可以通过下载、解压和运行安装程序来安装和使用psi,享受即时通讯带来的便捷。而XMPP协议的使用意味着psi可以与其他支持该协议的...

    Openfire 性能优化

    在用户规模达到数十万级别时,可能需要考虑更换服务器软件,如 Tigase,或者像案例中的做法,自建通信服务器。总之,Openfire 的性能优化涉及数据库选型、缓存策略、核心组件改造、系统参数调整以及集群方案等多个...

Global site tag (gtag.js) - Google Analytics