1
  • 备份配置文件和数据库

    • 导出原来的数据库(结构和数据)
    • 备份配置文件

      cp ../tigase-server7.02/etc/tigase.conf etc/
      cp ../tigase-server7.02/etc/init.properties etc/
    • 升级配置文件
      执行配置文件./scripts/tigase.sh upgrade-config etc/tigase.conf
      当出现如下画面时

      =============================================================================
          Configuration file etc/init.properties was converted to DSL format.
          Previous version of a configuration file was saved at etc/init.properties.old
      =============================================================================

      配置文件config.tdsl以连接到数据库。

    • 更新数据库结构
      ./scripts/tigase.sh upgrade-schema etc/tigase.conf
      Mysql数据库必须5.7以上版本
      成功之后,看到如下界面:

      =============================================================================
          Schema upgrade finished
      
            Data source: default with uri
          jdbc:mysql://HOST/DATABASE?user=USERNAME&password=PASSWORD
          Checking connection to database ok
          Checking if database exists     ok
          Loading schema: Tigase XMPP Server (Core), version: 8.0.0       ok
          Loading schema: Tigase Message Archiving Component, version: 1.3.0      ok
          Loading schema: Tigase MUC Component, version: 2.5.0    ok
          Loading schema: Tigase PubSub Component, version: 3.3.0 ok
          Adding XMPP admin accounts      warning
                  Message: Error: No admin users entered
          Post installation action        ok
      
      =============================================================================
    • 启动运行

      scripts/tigase.sh start etc/tigase.conf
  • 遇到的问题

    • 升级后,新增了tig_user_credentials表,需要针对原来认证方式存储用户密码,sha1或者plain.,否则会出现无法登陆的问题。
    • 存储聊天记录遇到的问题

      1. 先配置聊天记录

        message-archive {
          archive-repo-uri = 'jdbc:mysql://localhost/tigasedb7?user=root&password=root',
          tags-support = true
          }
          sess-man {
          message-archive {
             default-store-method = 'message',
             required-store-method = 'body'
          }
          }

        乱码问题,修改如下即可解决。

           message-archive {
           archive-repo-uri = 'jdbc:mysql://localhost/tigasedb7?user=root&password=root&useUnicode=true&characterEncoding=UTF-8',
           tags-support = true
          }

        群消息无法推送,收到new room locked消息体,设置配置文件config.tdsl

          muc {
              'muc-lock-new-room' = false
          }

zeronlee
112 声望13 粉丝