Tigase XMPP Server在CentOS部署與配置

來源:互聯網
上載者:User

標籤:style   blog   http   java   color   使用   

Tigase XMPP Server在CentOS部署與配置

chszs,轉載需註明。部落客頁:http://blog.csdn.net/chszs

下面講述Tigase XMPP Server在Linux伺服器上的安裝,Tigase包含了所有的標準模組,且後端儲存使用了MySQL資料庫。

伺服器CentOS 6.5Final x64

1、安裝JDK

Tigase需要JDK 1.6以上版本。另外,需配置JAVA_HOME環境變數。JDK7的安裝過程省略。

2、安裝MySQL

過程省略。

3、下載並安裝Tigase

Tigase的下載首頁有兩種發行版:
一是tigase-server-5.2.1-b3461-dist-max.tar.gz
二是tigase-server-5.2.1-b3461-dist.tar.gz
要弄清楚兩者的區別。

1)下載

$ wget https://projects.tigase.org/attachments/download/1409/tigase-server-5.2.1-b3461-dist.tar.gz

2)解壓

$ tar zvxf tigase-server-5.2.1-b3461-dist.tar.gz
$ mv tigase-server-5.2.1-b3461 tigase
$ cd tigase
$ chmod u+x ./scripts/tigase.sh 

3)配置

在etc子目錄下,有兩個重要的設定檔,一是init.properties,二是tigase.conf。
先對tigase.conf檔案做一點小修改:
JAVA_HOME="${JDKPath}"
把設定檔中JAVA_HOME的路徑指向正確的位置。
JAVA_HOME="/home/chuser/jdk7"

再修改init.properties設定檔,此設定檔包含了Tigase伺服器初始化的參數設定。需要修改以下內容:
 $ cat etc/init.properties 
--debug=server--comp-class-1 = tigase.muc.MUCComponent
--virt-hosts = cces

我把$HOST_NAME改成了cces
此外,還需要加上資料庫的配置。Tigase支援Derby、MySQL和PostgreSQL三種資料庫。我們使用MySQL,故還需在設定檔末尾加上:

--user-db-uri = jdbc:mysql://localhost/tigasedb?user=tigase&password=tigase456&useUnicode=true&characterEncoding=UTF-8--user-db = mysql--admins = [email protected]--comp-name-4 = message-archive--comp-name-3 = proxyconfig-type = --gen-config-def--comp-name-2 = pubsub--comp-name-1 = muc--cluster-mode = true--sm-plugins = +message-archive-xep-0136--debug = server--comp-class-4 = tigase.archive.MessageArchiveComponent--comp-class-3 = tigase.socks5.Socks5ProxyComponent--comp-class-2 = tigase.pubsub.PubSubComponent

接著修改tigase.conf設定檔:

#osgiEnabled=(true|false)#osgiEnabled=falseOSGI=falseENC="-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="/home/chuser/jdk7"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 "

4)匯入資料庫指令碼

修改資料庫指令碼檔案db-create-mysql.sh,設定Tigase伺服器要使用的資料庫的:
使用者名稱、密碼、資料庫名、資料庫管理員使用者名稱、資料庫管理員密碼、主機名稱
再執行
$ ./scripts/db-create-mysql.sh tigase tigase456 tigasedb root adminadmin 172.168.72.68

5)啟動Tigase伺服器

# ./scripts/tigase.sh start etc/tigase.conf
Starting Tigase: 
nohup: redirecting stderr to stdout
Tigase running pid=25597


6)關閉Tigase伺服器

# ./scripts/tigase.sh stop etc/tigase.conf 
Shutting down Tigase: 25597
1. Waiting for the server to terminate...
2. Tigase terminated.

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.