Installation using GUI installer
If you don't want to install Tigase using manual method, you can use the GUI installer.
Therefore it is the preferred way to install Tigase.
Prerequisites
Before you can start the GUI installer you will need to have working Java environment. Although installer only requires JRE (Java Runtime Environment), server needs the JDK (Java Development Kit).
After configuring JDK you can download the Tigase GUI installer and start the server installation process. It is also important to set the JAVA_HOMEenvironment correctly.
Download the installer // ( the latest )
Run the jar file
You will be able to check a whether your Java environment is working. To do it type the
java -version
you may start the installer i.e. for the file tigase-server-5.0.0-b2135.jar downloaded to the c:\download directory type the following command:
java -jar c:\download\tigase-server-5.0.0-b2135.jar
//You can add -console to install it using console installer, usually I am using it, I don't have GUI :)
This command should start the installer or print an error message explaining what is the cause of problem.
Notes:
· Tigase server base directory:
/usr/local/Tigase-5.0.0-b2135/
· To start tigase go to tigase base directory then:
# ./scripts/tigase.sh start etc/tigase.conf
· To stop tigase go to tigase base directory then:
# ./scripts/tigase.sh stop etc/tigase.conf
· To check if the server is running , just try to connect to it by using one of many available clients.(like: psi ‘/usr/bin/psi &’)
Note: To install psi,
· Install rpmforge repo
· # yum install psi
· An example content of the init.property file to run the tigase server in the cluster mode would be:
--virt-hosts=example.com
--cluster-mode=true
--cluster-nodes=cluster-node1,cluster-node2
--sm-cluster-strategy-class=cluster.StrategyImpl
Prepare the MySQL database for the Tigase server
Configuring from MySQL command line tool
Run the MySQL command line client in either Linux or MS Windows environment and enter following instructions:
- Create the database for the Tigase server:
1
| mysql> create database tigasedb;
|
- Add the
tigase_user
user (create user ‘tigase_user’ identified by ‘tigase_passwd’;) and grant him access to the tigasedb
database. Depending on how you plan to connect to the database (locally or over the network) use one of following commands or all if you are not sure:
- Grant access to tigase_user connecting from any network address.
1
| mysql> GRANT ALL ON tigasedb.* TO tigase_user@'%'
|
2
| IDENTIFIED BY 'tigase_passwd';
|
| | | |
- Grant access to tigase_user connecting from localhost.
1
| mysql> GRANT ALL ON tigasedb.* TO tigase_user@'localhost'
|
2
| IDENTIFIED BY 'tigase_passwd';
|
| | | |
- Grant access to tigase_user connecting from local machine only.
1
| mysql> GRANT ALL ON tigasedb.* TO tigase_user
|
2
| IDENTIFIED BY 'tigase_passwd';
|
| | |
- And now you can update user permission changes in the database:
1
| mysql> FLUSH PRIVILEGES;
|
- Load database schema to initialize the Tigase server database space. First, switch to the database you have just created:
For the Tigase server version 4.x and later you have to use proper schema version:
1
| mysql> source database/mysql-schema-4.sql;
|
N.B. There is an error in this schema; this is fixed by changing the last_logout default value to:
last_logout timestamp DEFAULT ‘1970-01-02 01:01:01’
Configuring MySQL for UTF-8 support
In the my.conf put following lines:
[mysql]
default-character-SET=utf8
[client]
default-character-SET=utf8
[mysqld]
init_connect='SET collation_connection = utf8_general_ci; SET NAMES utf8;'
character-set-server=utf8
default-character-SET=utf8
collation-server=utf8_general_ci
skip-character-set-client-handshake
Then connect to the database and from the command line shell check settings:
1
| SHOW VARIABLES LIKE 'character_set_database';
|
2
| SHOW VARIABLES LIKE 'character_set_client';
|
If any of these shows something else then 'utf8'
then you have to correct it:
1
| ALTER DATABASE tigasedb DEFAULT CHARACTER SET utf8;
|
Notes:
· You have to update your tigase server; Binary updates are located in the Tigase's maven repository. Replace jars/tigase-server.jar by jars/tigase-server-x.x.jar Nothing more.
· If you are using clustered mysql database with your tigase server you have to alter all tables in tigase schema to use ndb engine which needs to drop all foreign keys.
mysql > alter table <table-name> drop foreign key <foreign-key-name>;
mysql> alter table t1 engine=ndb;
· Java Home: /usr/java/jdk1.6.0-23
- To enable cluster mode in tigase:
Add the following lines in init.properties:
--cluster-mode=true
--cluster-nodes=tigase1, tigase2
- To print all received and sent character data, add:
--debug=xmpp.XMPPIOService
Done
Inas