Now we will focus on setting things up to have both services up and running together. Below is example of the most complex environment to run where LibreSource is using PostgreSQL database and Tigase is using MySQL database. All basic user data needed for authentication are kept by LibreSource so Tigase has to connect to PostgreSQL database too to authenticate users.
Using configuration wizards generate configuration for Tigase server to connect to LibreSource database. Here is the sample file with parameters for configuration wizard assuming following setup:
Tigase works for domain: domain.net
ENC="-Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8" DRV="-Djdbc.drivers=com.mysql.jdbc.Driver:org.postgresql.Driver" JAVA_OPTIONS="${ENC} ${DRV} -server -Xms100M -Xmx100M " TIGASE_CONFIG="etc/tigase-mysql-libresource.xml" TIGASE_OPTIONS="--gen-config-def \ --user-db mysql \ --user-db-uri jdbc:mysql://localhost/tigase?user=dbuser&password=dbpass&autoCreateUser=true \ --auth-db libresource \ --auth-db-uri jdbc:postgresql://localhost/libresource?user=demo \ --virt-hosts domain.net,localhost "
And simpler example where all data (LibreSource and Tigase) are stored in the same database:
Tigase works for domain: domain.net
ENC="-Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8" DRV="-Djdbc.drivers=com.mysql.jdbc.Driver:org.postgresql.Driver" JAVA_OPTIONS="${ENC} ${DRV} -server -Xms100M -Xmx100M " TIGASE_CONFIG="etc/tigase-mysql-libresource.xml" TIGASE_OPTIONS="--gen-config-def \ --user-db pgsql \ --user-db-uri jdbc:postgresql://localhost/libresource?user=demo&autoCreateUser=true \ --auth-db libresource \ --auth-db-uri jdbc:postgresql://localhost/libresource?user=demo \ --virt-hosts domain.net,localhost "
Now, you can run Tigase in usual way and all works.
Note! In any case you have to load Tigase database schema for user data. Please refer to guide for specific database: ////<<mysql2database,////MySQL or ////<<postgresDB2,////PostgreSQL.