Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Detailed process of manual installation of Tigase

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "the detailed process of manual installation of Tigase". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn "the detailed process of manual installation of Tigase"!

Installation environment

Environment version operating system CentOS release 6.5 (Final) database MySQL 5.6.23tigase server7.1.0JDK1.8

Hardware server operating system

Operation and maintenance team is responsible for the shelves, operating system CentOS release 6.5 (Final). Thank you Gai Yi

Bw-test-ab-v01,bw-test-ab-v02 of two machines (temporarily inaccessible, followed by operation and maintenance team)

It was originally planned to deploy tigase clusters on two machines, but as a result, one of them was not available. The solution was decisively changed to stand-alone deployment (cluster deployment method later).

II. Database

The DBA team is responsible for installing database MySQL 5.6.23, which is installed on the bw-test-ab-v01 server. Thanks to Sheng Liang and Bi Changqi

The database is installed in bw-test-ab-v01

Specific parameters are as follows: tigasedb_test password: r # xxxxxx09H ^ jTQ% p Port: 3324 address: 10.xxx.90.194 (use x to hide sensitive information)

III. JDK installation

1. Create a java installation directory under the usr directory

Cd / usr

Mkdir java

2. Copy the file jdk-8u112-linux-x64.tar.gz to the / usr/java directory (the java directory needs to be created in advance)

3. Extract jdk to the current directory

Tar-zxvf jdk-8u112-linux-x64.tar.gz to get the folder jdk1.8.0_112

4. Establish a quick connection (save directory length)

Ln-s / usr/java/jdk1.8.0_60/ / usr/jdk

5. Edit configuration files and configure environment variables

Vim / etc/profile

Add the following at the end of the file:

JAVA_HOME=/usr/jdk

CLASSPATH=$JAVA_HOME/lib/

PATH=$PATH:$JAVA_HOME/bin

Export PATH JAVA_HOME CLASSPATH

6. The command execution configuration takes effect.

Source / etc/profile

IV. Installation of Tigase server

1. Prepare tigase server files

Copy the tigase-server-7.1.0-b4379-dist-max.tar.gz file to the / usr directory on the bw-test-ab-v01 machine. Unzip tar-xzvf tigase-server-7.1.0-b4379-dist-max.tar.gz and rename the resulting directory to tigase. The installation directory of the tigase server is / usr/tigase.

2. Modify the JAVA_HOME=/usr/jdk (JDK installation path) in tigase.conf (in / usr/tigase/etc directory).

3. Initialize the database

(1) execute the command mysql-h 10.xxx.90.194-P 3324-utigasedb_test-p'r# xxxxxx09H ^ jTQ% p'in the / usr/tigase directory; (the password needs to be enclosed in''because it has special characters, and mysql-h localhost-P 3324-utigasedb_test-p'r# xxxxx09H ^ jTQ% p' is not connected to the database, which may be related to the way the database is installed)

(2) there is a lot of database account authorization process in the Prepare the MySQL Database for the Tigase Server section of the official document. I estimate that DBA has already done relevant work, so skip this step.

(3) initialize the database table structure

Mysql > use tigasedb; (switch current database)

Execute the following five statements respectively

Mysql > source database/mysql-schema-7-1 color schema.sql; (this file name is misspelled in the official document)

Mysql > source database/mysql-pubsub-schema-3.2.0.sql

Mysql > source database/mysql-socks5-schema.sql

Mysql > source database/mysql-schema-7-1-sp.sql (this item is omitted in the official document. If it is not executed, tigase server will not start normally)

Mysql > source database/mysql-schema-7-1-props.sql (not sure if it must be executed)

Note: when executing the mysql-schema-7-1-sp.sql statement, the following error occurred because the account provided by DBA does not have SUPER permission (usually not given by DBA)

ERROR 1419 (HY000): You do not have the SUPER privilege and binary logging is enabled (you * might* want to use the less safe log_bin_trust_function_creators variable)

After investigation, the TigGetDBProperty function in the mysql-schema-4-sp.sql file was not created successfully, decisively contacted DBA to open the permission, the creat statement of this function was executed separately, and was successful.

(4) configure database UTF-8 support. The library given by DBA should be encoded, ignore it.

4. Modify init.properties file. The configuration is as follows

Config-type=--gen-config-def

-- admins=admin@bw-test-ab-v01.dns.guazi.com

-- virt-hosts=bw-test-ab-v01.dns.guazi.com

-- debug=server

-- comp-name-1=http

-- comp-class-1=tigase.http.HttpMessageReceiver

-- user-db=mysql

-- user-db-uri=jdbc:mysql://10.xxx.90.194:3324/tigasedb?user=tigasedb_test&password=r# xxxxxx09H ^ jTQ% 25p & useUnicode=true&characterEncoding=UTF-8

Http/setup/admin-credentials=admin:tigase

Note a few points:

(1) what does virt-hosts match?

Tigase has an installation method, Installation Using Web Installer, which is used. At some point in the middle, tigase will automatically read the virtual host name. I will not elaborate on this method.

The virt-hosts value is related to the specific network environment, which will be described in more detail in the future. The method I used, through two linux commands

Cat / etc/resolv.conf get dns.guazi.com

Hostname gets bw-test-ab-v01.

Put it together and get it done. (when I configured tigase7.0.4 on windows before, I modified the hosts file to set 127.0.0.1 to test@org, and finally the machine name that hosts seems to match.)

(2) configuration of user-db-uri

Because the database password contains'%'to be transcoded,'% 'needs to be changed to'% 25' to be configured as r# I7Gk9sn09H ^ jTQ% 25p. Otherwise, tigase will not connect to the database.

(3) admins configuration

At this time, there is no user in the tigase database. Configure admin@bw-test-ab-v01.dns.guazi.com as the administrator here. After the server is installed, register the admin@bw-test-ab-v01.dns.guazi.com user, and the user will have administrator permissions by default. Of course, multiple administrators can be configured.

(4) http/setup/admin-credentials=admin:tigase is the initial account and password installed through Web, and I didn't delete it.

5. Start the tigase server

Follow the above steps to complete the Tigase server configuration and run. / scripts/tigase.sh start in the / usr/tigase directory to start the server. Observe that logs/tigase-console.log and logs/tigase.log.0 did not report an error. The server is installed. Access to http://10.xxx.90.194:8080/ is normal.

IV. Registered users

Visit the address http://10.xxx.90.194:8080/ui, you can see the registration button, you can theoretically register users to use. But I installed this version of tigase-server-7.1.0-b4379 this function can not be used (registered users did not respond, the database is not successful), I am not sure whether it is my installation problem, or this version of what bug.

How to solve it? Register users directly through the database.

In Navicat (the client where I connect to the database), run the command call TigAddUserPlainPw ('test1@bw-test-ab-v01.dns.guazi.com',' test1'); successfully register the user test1@bw-test-ab-v01.dns.guazi.com with the password test1. Register an admin@bw-test-ab-v01.dns.guazi.com user (administrator).

Check the database table tig_users and the user registers successfully.

At this point, I believe you have a deeper understanding of "the detailed process of manual installation of Tigase". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report