Linux XMPP server Tigase (Spark client test)

Source: Internet
Author: User

Linux XMPP server Tigase (Spark client test)

Tigase is an XMPP server developed based on Java. Similar to Openfire, Tigase can be used to build an Instant Messaging (IM) platform.

1. Preparation

Before installing Tigase, you must first prepare the Java Environment and Database (MySQL is used in this article ).

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

Download: tigase-server-5.2.2-b3463-dist-max.tar.gz and decompress the file:

Wget https://projects.tigase.org/attachments/download/1604/tigase-server-5.2.2-b3463-dist-max.tar.gz
 

PS: You can also download the tigase-server-5.2.2-b3464.jar for automated installation, run java-jar tigase-server-5.2.2-b3464.jar can be installed through the GUI installation interface, run java-jar tigase-server-5.2.2-b3464.jar-console can be automated installation through the console. These two installation methods are not described in this document. Use tigase-server-5.2.2-bda-3-dist-max.tar.gz for manual installation.

2. modify the configuration file

You need to modify two configuration files: etc/tigase. conf and etc/init. properties.

Open the etc/tigase. conf file, find the configuration item: JAVA_HOME = "$ {JDKPath}", and change it to the main directory of Java: JAVA_HOME = "/java/jdk1.7.0 _ 67 ".

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

Config-type = -- gen-config-def

Change $ HOST_NAME in the file to the IP address or host name. In addition, add the database configuration in the file:

Config-type = -- gen-config-def
192.168.20.128
192.168.20.128
-- User-db = mysql

Jdbc: mysql: // 127.0.0.1: 3306/tigasedb? User = root & password = 123456 is the URI connecting to the MySQL database. 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, And 123456 password.

3. Create a database

Method 1:

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

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

In the parameter, root is the database username, 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 is decompressed; otherwise, the following error will be reported:

Loading schema

Method 2:

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

Mysql-h127.0.0.1-uroot-p123456

After the database is created, go to MySQL to check whether it is successfully created:

4. Start the Tigase Server

Run scripts/tigase. sh to start the Tigase Server:

./Scripts/tigase. sh start etc/tigase. conf

After startup, you can check the following logs/tigase-console.log to see if there are exceptions, for example, the following exceptions indicate that the 5222 port is occupied:

In addition, to disable the Tigase server, run the following command:

./Scripts/tigase. sh stop etc/tigase. conf

5. Use Spark to test the Tigase Server

After the server is started successfully, use the XMPP client Spark to test the Tigase server.

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

After the creation is successful, log on directly.

In addition, open another Spark, create another user, log on to the server, add contacts, and chat with each other to test whether the Tigase server works properly.

PS: in Windows, it seems that only one Spark can be enabled. In fact, you only need to copy the Spark Program folder and open Spark from it to enable multiple Spark.

Reference: http://docs.tigase.org/tigase-server/snapshot/admin_guide/html/#_manual_installation_in_console_mode

Author: Cross brother reprint please indicate the source: http://blog.csdn.net/xiao__gui/article/details/40891667

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.