Linux build XMPP server tigase (Spark client test)

Source: Internet
Author: User

Tigase is a Java-based XMPP server, similar to OpenFire, that can be used to build a platform for instant messaging (Instant Messaging, or IM).

1. Preparation

Before installing Tigase, you first need to prepare the Java environment and the database (this article uses MySQL).

Tigase Download: https://projects.tigase.org/projects/tigase-server/files


Download:tigase-server-5.2.2-b3463-dist-max.tar.gz, unzip the file:

wget https://projects.tigase.org/attachments/download/1604/tigase-server-5.2.2-b3463-dist-max.tar.gz
Tar zxvf tigase-server-5.2.2-b3463-dist-max.tar.gz-c/tigase

PS: You can also download Tigase-server-5.2.2-b3464.jar for automated installation, run Java-jar Tigase-server-5.2.2-b3464.jar Can be installed through GUI installation interface, running java-jar tigase-server-5.2.2-b3464.jar-console can be installed automatically through the console. Both of these installation methods are no longer described in this article, which is manually installed using tigase-server-5.2.2-b3463-dist-max.tar.gz.

2. Modify the configuration file

Two configuration files need to be modified:etc/tigase.conf,etc/init.properties.

Open the etc/tigase.conf file, locate the configuration entry:java_home= "${jdkpath}", and modify it to JAVA's home directory:java_home= "/java/jdk1.7.0 _67 ".

Open the etc/init.properties file, the initial content in the file:

Config-type=--gen-config-def
[Email protected] $HOST _name
--virt-hosts = $HOST _name
--debug=server

Change the $HOST _name in the file to an IP address or host name , plus the configuration of the database in the file:

Config-type=--gen-config-def
[Email protected] 192.168.20.128
--virt-hosts = 192.168.20.128
--debug=server
--user-db=mysql
--user-db-uri = jdbc:mysql://127.0.0.1:3306/tigasedb?user=root&password=123456

Jdbc:mysql://127.0.0.1:3306/tigasedb?user=root&password=123456 is the URI that connects the MySQL database, Where 127.0.0.1 is the host address of the database, 3306 is the port number, Tigasedb is the database name, root is the user name, 123456 password.

3. Create a Database

Method One:

Run the scripts/db-create-mysql.sh script:

./scripts/db-create-mysql.sh root 123456 tigasedb root 123456 127.0.0.1

The parameter root is the database user name, 123456 is the database password, tigasedb is the database name, and 127.0.0.1 is the database host address.

Note that the SH script must be run in the home directory after tigase decompression, otherwise the following error will be reported:

Loading schema
./db-create-mysql.sh:line 83:database/mysql-schema-5-1.sql:no such file or directory

Method Two:

In addition to running the scripts/db-create-mysql.sh script, you can also execute the database/mysql-schema-5-1.sql file directly to create the database:

mysql-h127.0.0.1-uroot-p123456
mysql> CREATE DATABASE Tigasedb;
mysql> use Tigasedb;
Mysql> Source Database/mysql-schema-5-1.sql

After the database is created, go to MySQL to see if the creation was successful:


4. Start Tigase Server

Execute scripts/tigase.sh to start the Tigase server:

./scripts/tigase.sh Start etc/tigase.conf

After starting, you can check the following Logs/tigase-console.log to see if there are any exceptions, such as the following exception description 5222 port number is occupied:


In addition, if you want to shut down the tigase server you can do:

./scripts/tigase.sh Stop Etc/tigase.conf

5. Test Tigase server with Spark

After the server starts successfully, use XMPP client Spark to test the tigase server.

Open Spark, register a new user, the server is the host name or IP address of the Tigase server, and the--virt-hosts configuration item in Etc/init.properties is consistent.


Once the creation is successful, you can log in directly.

Open another spark, create another user and log in, add contacts, and chat with two spark to test whether the Tigase server is working properly.



Ps:windows seems to only open a spark, in fact, just a copy of the Spark program folder, open Spark from inside, you can start multiple spark.



Reference Document: http://docs.tigase.org/tigase-server/5.3.0/adminguide/#_manual_installation_in_console_mode


Fork Brother reproduced please indicate the source: http://blog.csdn.net/xiao__gui/article/details/40891667



Linux Build XMPP server tigase (Spark client test)

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.