Deployment and configuration of tigase XMPP server in centos

Source: Internet
Author: User
Tags import database

Deployment and configuration of tigase XMPP server in centos

Chszs, which must be noted for reprinting. Blog homepage: http://blog.csdn.net/chszs

The following describes how to install tigase XMPP server on a Linux server. tigase includes all the standard modules and uses the MySQL database for backend storage.

Server centos 6.5 final x64

1. Install JDK

Tigase requires JDK 1.6 or later. In addition, you must configure the java_home environment variable. The Installation Process of JDK 7 is omitted.

2. Install MySQL

Process omitted.

3. Download and install tigase

The download page of tigase can be released in two ways:
Tigase-server-5.2.1-b4501-dist-max.tar.gz
Second, tigase-server-5.2.1-b4501-dist.tar.gz
You need to find out the difference between the two.

1) download

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

2) decompress

$ 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) Configuration

In the ETC sub-directory, there are two important configuration files: init. properties and tigase. conf.
First, make a small modification to the tigase. conf file:
Java_home = "$ {jdkpath }"
Point the java_home path in the configuration file to the correct location.
Java_home = "/home/chuser/jdk7"

Modify the init. properties configuration file, which contains the parameter settings initialized by the tigase server. You need to modify the following content:
$ Cat etc/init. Properties
-- DEBUG = server -- comp-class-1 = tigase. MUC. muccomponent
-- Virt-hosts = CCES

I changed $ host_name to CCES.
In addition, you must add the database configuration. Tigase supports three databases: Derby, MySQL, and PostgreSQL. We use MySQL, so we need to add the following at the end of the configuration file:

--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

Then modify the tigase. conf configuration file:

#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) import database scripts

Modify the database script file db-create-mysql.sh to set the database to be used by the tigase Server:
User name, password, database name, database administrator user name, database administrator password, Host Name
Run again
$./Scripts/db-create-mysql.sh tigase tigase456 tigasedb root adminadmin 172.1672.68

5) Start the tigase Server

#./Scripts/tigase. Sh start ETC/tigase. conf
Starting tigase:
Nohup: redirecting stderr to stdout
Tigase running pid = 25597


6) disable the tigase Server

#./Scripts/tigase. Sh stop ETC/tigase. conf
Shutting down tigase: 25597
1. Waiting for the server to terminate...
2. tigase terminated.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.