Linux XMPP server Tigase (Spark client test), xmpptigase

Source: Internet
Author: User

Linux XMPP server Tigase (Spark client test), xmpptigase

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 prepareJava environmentAndDatabase (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
Tar zxvf tigase-server-5.2.2-b3463-dist-max.tar.gz-C/tigase

PS: You can also downloadTigase-server-5.2.2-b3464.jarAutomated Installation and OperationJava-jar tigase-server-5.2.2-b3464.jarYou can install and run the tool on the GUI.Java-jars tigase-server-5.2.2-b3464.jar-consoleYou can use the console for automated installation. 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,Etc/init. properties.

OpenEtc/tigase. confFile to find the configuration items:JAVA_HOME = "$ {JDKPath }"To change it to the main directory of Java:JAVA_HOME = "/java/jdk1.7.0 _ 67".

OpenEtc/init. propertiesFile, the initial content of the file:

Config-type = -- gen-config-def
-- Admins = admin @ $ HOST_NAME
-- Virt-hosts = $ HOST_NAME
-- Debug = server

Convert$ HOST_NAMEChangeIP address or host nameIn additionAdd Database Configuration:

Config-type = -- gen-config-def
-- Admins = admin @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 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:

RunScripts/db-create-mysql.shScript:

./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
./Db-create-mysql.sh: line 83: database/mysql-schema-5-1. SQL: No such file or directory

Method 2:

In addition to running the scripts/db-create-mysql.sh script, you can also directly executeDatabase/mysql-schema-5-1. SQLFile to create a 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 check whether it is successfully created:


4. Start the Tigase Server

RunScripts/tigase. shStart the Tigase Server:

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

After startup, you can view the followingLogs/tigase-console.logCheck whether there is any exception. For example, the following exception indicates that the port number 5222 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/5.3.0/adminguide/#_manual_installation_in_console_mode


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






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.