Follow steps below to prepare the PostgreSQL database:
First, add the tigase_user
:
createuser -U admin_db_user -W -D -R -S -P tigase_user
You will be asked for credentials for admin_db_user and password for new database user.
Create the database for the Tigase server with tigase_user as owner of database:
createdb -U admin_db_user -W -O tigase_user tigasedb
Load database schema to initialize the Tigase server
psql -q -U tigase_user -W tigasedb -f database/postgresql-common-0.0.1.sql psql -q -U tigase_user -W tigasedb -f database/postgresql-common-0.0.2.sql etc..
Continue by adding the schema files listed below:
postgresql-common-0.0.1.sql postgresql-common-0.0.2.sql postgresql-server-7.0.0.sql postgresql-server-7.1.0.sql postgresql-server-8.0.0.sql postgresql-muc-3.0.0.sql postgresql-pubsub-3.1.0.sql postgresql-pubsub-3.2.0.sql postgresql-pubsub-4.0.0.sql postgresql-http-api-2.0.0.sql
Other components may require installation such as:
postgresql-socks5-2.0.0.sql postgresql-push-1.0.0.sql postgresql-message-archiving-2.0.0.sql postgresql-unified-archive-2.0.0.sql
Note
The above commands should be executed from the main Tigase directory. The initialization schema file should be also available locally in database/ directory of your Tigase installation.