<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    paulwong

    Tigase服務器安裝以及集群

    安裝第一臺tigase服務器

    1. 安裝tigase服務器所需環境。

    [root@tigase3~]# yum install java-1.7.0-openjdk.x86_64 java-1.7.0-openjdk-devel.x86_64

    1. 下載tigase服務器軟件包。

    [root@tigase3tmp]#wget https://projects.tigase.org/attachments/download/1342/tigase-server-5.2.0-b3447.jar

    1. 建立一個服務器安裝路徑。

    root@tigase3tmp]# mkdir /opt/tigase-server

    1. 開始安裝軟件。

    [root@tigase3tmp]#java -jar tigase-server-5.2.0-b3447.jar -console

    press1 to continue, 2 to quit, 3 to redisplay

    1繼續

    Theinstalled application needs a JDK. A java runtime environment (JRE)will be not sufficient.

    Enterpath: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.55.x86_64

    輸入JDK的路徑再按回車鍵

    Thewizards you want to execute

    Installationof the Tigase Server

    [on,off]

    選擇:on

    Configurationof the Tigase Server

    [on,off]

    選擇:on

    press1 to continue, 2 to quit, 3 to redisplay

    1繼續

    1. I accept the terms of this license agreement.

    2. I do not accept the terms of this license agreement.

    Choosenumber (1-2):輸入1

    press1 to continue, 2 to quit, 3 to redisplay

    1繼續

    Selecttarget path [/tmp]

    /opt/tigase-server

    設置tigase服務器的安裝路徑。

    r => Redisplay menu

    d => Done


    Chooseaction:d

    0  [x] Defaultinstallation

    1  [ ] Default plusextra components

    2  [ ] Session Manageronly

    3  [ ] Networkconnectivity only

    inputselection:1

    YourXMPP (Jabber) domains [tigase3.test.com]

    test.com            #設置XMPP域為test.com

    YourXMPP (Jabber) domains [tigase3.test.com]

    admin@test.com

    Adminpassword [tigase]


    0  [x] Derby (built-indatabase)

    1  [ ] MySQL

    2  [ ] PostgreSQL

    3  [ ] SQLServer

    4  [ ] Other...

    inputselection:2          

    Advanced configurationoptions

    [on, off]

    Off

    PostgreSQLsuper user account will be used only to create and configure databasefor the Tigase server. It will not be used by the Tigase server lateron.


    Super user accountname: [root]

    postgres                               #輸入postgres數據庫超級用戶和密碼.

    WARNING:password will be visible while entering

    Superuser password: postgres

    WARNING:password will be visible while entering

    Retypepassword: postgres


    PostgreSQLdatabase details. It will be created automatically if it does notexist.

    Databaseaccount: [tigase]                 #輸入存放tigase數據的數據庫用戶名和密碼

    tigase

    Accountpassword: [tigase12]

    tigase

    Databasename: [tigasedb]

    tigasedb

    Databasehost or IP: [localhost]

    127.0.0.1

    Additionaldatabase parameters: []


    press1 to continue, 2 to quit, 3 to redisplay

    1

    PerformingDB tasks


    Checkingconnection to the database  

    ConnectionOK

    Checkingif the database exists  

    ExistsOK

    Checkingthe database schema  

    Newschema loaded OK

    Checkingwhether the database needs conversion  

    Conversionnot needed

    Apr05, 2014 3:55:48 AM tigase.db.jdbc.DataRepositoryImpl initRepository

    INFO:Table schema found: public, database type: postgresql, databasedriver: org.postgresql.Driver

    Apr05, 2014 3:55:48 AM tigase.db.jdbc.DataRepositoryImpl initRepository

    INFO:Initialized database connection:jdbc:postgresql://127.0.0.1/tigasedb?user=postgres&password=postgres

    Apr05, 2014 3:55:48 AM tigase.db.jdbc.DataRepositoryImpl initRepository

    INFO:Table schema found: public, database type: postgresql, databasedriver: org.postgresql.Driver

    Apr05, 2014 3:55:48 AM tigase.db.jdbc.DataRepositoryImpl initRepository

    INFO:Initialized database connection:jdbc:postgresql://127.0.0.1/tigasedb?user=postgres&password=postgres


    Allusers added

    Postinstallation actions  

    Finalizing...completed OK

    Loadingsocks5 component schema  

    Loadingsocks5 schema... completed OK

    LoadingPubSub component schema  

    LoadingPubSub schema... completed OK



    Installwas successeful

    applicationinstalled on /opt/tigase-server

    [Console installation done ]

    1. 啟動tigase服務并添加到系統啟動服務.

    [root@tigase3tmp]# cd /opt/tigase-server/

    [root@tigase3tigase-server]# ./scripts/tigase.sh start etc/tigase.conf

    StartingTigase:

    Tigaserunning pid=1217

    nohup:redirecting stderr to stdout

    [root@tigase3tigase-server]# cd /opt/tigase-server/scripts/redhat/init.d

    [root@tigase3init.d]# cp tigase /etc/init.d/

    [root@tigase3init.d]# cd /etc/init.d/

    [root@tigase3init.d]# chmod a+x tigase

    [root@tigase3init.d]# useradd tigase

    [root@tigase3init.d]# chown -R tigase:tigase /opt/tigase-server/logs

    [root@tigase3init.d]# vi tigase

    TIGASE_HOME=/opt/tigase-server     安裝目錄改為:/opt/tigase-server

    [root@tigase3init.d]# chkconfig --add /etc/init.d/tigase

    [root@tigase3init.d]# chkconfig tigase on

    [root@tigase3init.d]# service tigase start

    StartingTigase XMPP server

    Tigasestarted[  OK  ]



    安裝第二臺tigase服務器實現集群

    1. 安裝部署與第一臺tigase服務器一樣,只是選擇數據庫時不是選擇本地,而是選擇安裝在第一臺tigase服務器上的數據庫,實現一臺數據庫做了后端集群,也是目前最簡單最實用的方法。

    安裝時不同之處如下:

    PostgreSQLdatabase details. It will be created automatically if it does notexist.


    Databaseaccount: [tigase]

    Tigase                         #存放tigase數據的用戶、密碼以及數據庫相同

    Accountpassword: [tigase12]

    tigase

    Databasename: [tigasedb]

    tigasedb

    Databasehost or IP: [localhost]

    192.168.3.180                   #設置數據庫連接安裝在第一臺tigase服務器的數據庫.


    最后輸出時顯示信息有一點不一樣。

    PerformingDB tasks


    Checkingconnection to the database  

    ConnectionOK

    Checkingif the database exists  

    ExistsOK

    Checkingthe database schema  

    SchemaOK, accounts number: 7

    Checkingwhether the database needs conversion  

    Conversionnot needed

    AddingXMPP admin accounts  Apr 05, 2014 1:41:17 PMtigase.db.jdbc.DataRepositoryImpl initRepository

    INFO:Table schema found: public, database type: postgresql, databasedriver: org.postgresql.Driver

    Apr05, 2014 1:41:17 PM tigase.db.jdbc.DataRepositoryImpl initRepository

    INFO:Initialized database connection:jdbc:postgresql://192.168.3.180/tigasedb?user=postgres&password=postgres

    Allusers added

    Postinstallation actions  

    Finalizing...completed OK

    Loadingsocks5 component schema  

    Loadingsocks5 schema...

    Socks5schema exists, skipping schema load

    LoadingPubSub component schema  

    LoadingPubSub schema...

    PubSubschema exists, skipping schema load


    重啟兩臺服務器查看日志

    tigase-console.log tigase.log.0

    出現以下日志表示集群成功.

    2014-04-0513:51:56.486 [ConnectionOpenThread] ClusterConnectionManager.serviceStarted()  INFO: cluster connectionopened: 192.168.3.181, type: connect,id=192.168.3.180_54221_192.168.3.181_5277


    如不從啟服務有可能出現以下日志

    2014-04-0513:51:41.400 [pool-16-thread-5] ClusterConnectionManager.processHandshake()  WARNING: Handshakingpassword doesn't match, disconnecting: null, type: accept, Socket:nullSocket[addr=/192.168.3.180,port=54219,localport=5277], jid: null


    重啟服務都不行,就有可能是域名解析的原因.可用hostname–f查看你計算機的FQDN,tigase5.2后安裝就實現自動集群,但對計算機的FQDN比較嚴格.

    :

    [root@tigase3logs]# hostname -f

    tigase3.test.com

    [root@tigase4logs]# hostname -f

    tigase4.test.com

    hostname–f出來是未知主機,那集群將無法實現.改正以下兩個地方

    /etc/hosts

    /etc/sysconfig/network


    安裝后系統集群成功后默認可以在不同服務器上登錄以及添加聯系人,但建立room后不能實現不同服務器之前通信.

    實現方法如下:

    1檢查/opt/tigase-server/jars下是否有tigase-acs.jar,如果沒有可到官網下載max,解壓后再復制進去,MAX包是最完整的,一般推薦下這個,然后按需所取即可!

    2.修改兩臺集群服務器的/opt/tigase-server/etc/init.properties文件.

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

    --comp-class-1 = tigase.muc.cluster.MUCComponentClustered

    兩臺集群服務器配置都改成一樣.

    重新啟動tigase服務,測試成功.

    posted on 2016-04-19 10:17 paulwong 閱讀(842) 評論(0)  編輯  收藏 所屬分類: TIGASE


    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    主站蜘蛛池模板: 久久久久亚洲av成人无码电影 | 青青草免费在线视频| 亚洲愉拍一区二区三区| 亚洲国产成人久久一区久久 | 又黄又爽无遮挡免费视频| 少妇性饥渴无码A区免费| 亚洲日本乱码卡2卡3卡新区| 亚洲国产精品自在拍在线播放| 99久久国产免费-99久久国产免费 99久久国产免费中文无字幕 | 亚洲熟伦熟女专区hd高清| 亚洲综合久久夜AV | 无码国产精品一区二区免费式影视 | 免费A级毛片无码无遮挡内射| 粉色视频在线观看www免费| 亚洲毛片在线观看| 日韩免费毛片视频| 亚洲精品免费在线观看| 激情婷婷成人亚洲综合| 亚洲视频中文字幕| 亚洲精品视频久久久| 最近中文字幕无免费视频| 成人片黄网站色大片免费观看APP| 亚洲国产最大av| 亚洲bt加勒比一区二区| 亚洲日本中文字幕天堂网| 18禁超污无遮挡无码免费网站国产| 99精品视频免费| 国产亚洲男人的天堂在线观看| 亚洲精品成人av在线| 亚洲一本大道无码av天堂| 女人让男人免费桶爽30分钟| 无码少妇精品一区二区免费动态 | 亚洲一区二区三区高清在线观看| 中文亚洲AV片在线观看不卡| 日本免费中文字幕在线看| 999国内精品永久免费视频| 无码av免费一区二区三区试看| 国产VA免费精品高清在线| 偷自拍亚洲视频在线观看99| 2020国产精品亚洲综合网| 亚洲视频一区二区在线观看|