Tigase Xmpp Server 安裝 MongoDB​



  • Tigase Xmpp Server 安裝 MongoDB

    今天分享如何在Tigase Server 上安裝 MongoDB

    環境準備

    • Windows Tigase版本:tigase-server-7.0.4-b3844
    • Windows MongoDB版本:3.0.6

    執行步驟

    1. 安裝Tigase Xmpp Sever
    2. 資料庫安裝時,選擇Others
    3. 安裝完成後,設定etc的init-mongo.properties檔案,設定值如下

    config-type=--gen-config-def
    --admins=admin@10.142.214.100  -->設定登入的Tigase帳號
    --virt-hosts=10.142.214.100    -->設定登入的Tigase主機
    --debug=server,xmpp,cluster,pubsub,bosh

    --auth-db=tigase.mongodb.MongoRepository
    --user-db=tigase.mongodb.MongoRepository
    --user-db-uri=mongodb://localhost/tigase

    #HTTP
    --comp-name-1=http
    --comp-class-1=tigase.http.HttpMessageReceiver
    http/http/port[I]=6060
    http/dns-webservice/active[B]=true
    http/api-keys[s]=open_access
    http/rest-scripts-dir[S]=scripts/rest
    http/server-class[S]=tigase.http.java.JavaStandaloneHttpServer
    http/RestModule/active[B]=true

    #MUC
    --comp-name-2=muc
    --comp-class-2=tigase.muc.MUCComponent
    --muc/history-db-uri=mongodb://localhost/tigase  -->設定登入MongoDB
    --muc/history-db=tigase.mongodb.muc.MongoHistoryProvider

    #PUBSUB
    --comp-name-3=pubsub
    --comp-class-3=tigase.pubsub.PubSubComponent
    --pubsub/pubsub-repo-url=mongodb://localhost/tigase
    --pubsub/pubsub-repo-class=tigase.mongodb.pubsub.PubSubDAOMongo


    #AMP
    --comp-name-4=amp
    --comp-class-4=tigase.server.amp.AmpComponent

    amp/amp-repo-uri=mongodb://localhost/tigase
    amp/amp-repo-class=tigase.mongodb.MongoMsgRepository

    sess-man/plugins-conf/amp/amp-repo-uri=mongodb://localhost/tigase
    sess-man/plugins-conf/amp/amp-repo-class=tigase.mongodb.MongoMsgRepository

    #MWSSAGE-ARCHIVE
    --comp-name-5=message-archive
    --comp-class-5=tigase.archive.MessageArchiveComponent
    message-archive/archive-repo-uri=mongodb://localhost/tigase
    message-archive/auto=true

    #--comp-name-6=bosh
    #--comp-class-6=tigase.server.bosh.BoshConnectionManager
    #bosh/connections/ports=5280,5281
    #bosh/connections/5281/scoket[S]=ssl
    #bosh/connections/5281/type[S]=accept

    --sm-plugins=+jabber:iq:register,+message-archive-xep-0136,+msgoffline,+amp,-starttls
    sess-man/plugins-conf/message-archive-xep-0136/component-jid=message-archive@10.142.214.100 
    sess-man/plugins-conf/message-archive-xep-0136/default-store-method=body
    sess-man/plugins-conf/message-archive-xep-0136/required-store-method=body
    sess-man/plugins-conf/message-archive-xep-0136/store-muc-messages=user

    #message-router/components/msg-receivers/id-names[s]=bosh,cl-comp,eventbus,s2s,sess-man


    4.  設定完成後,手動啟動Tigase Server

    5. Tigase Server會自動在MongoDB建置Tigase所需的表

    msg_broadcast
    msg_broadcast_recp
    msg_history
    muc_history
    system.indexes
    tig_ma_msgs
    tig_nodes
    tig_pubsub_affiliations
    tig_pubsub_items
    tig_pubsub_nodes
    tig_pubsub_service_jids
    tig_pubsub_subscriptions
    tig_users

    6.  完成後,Tigase就可以正常的註冊與登入使用

    PS. 目前測試3.2.1在安裝時,可以註冊,但無法正常登入,故不建議使用

    感謝各位耐心觀看 ~~🙏


  • 註冊用戶

    好文,感謝,已收藏

    另外沒有圖解說明嗎?



  • 不好意思 因為圖片上需要處理 稍後補上


登录后回复
 

与 萌阔论坛 的连接断开,我们正在尝试重连,请耐心等待