Chapter 80. Installation
Prev |  | Next

# Chapter 80. Installation

Artur Hefczyc <artur.hefczyc@tigase.net> v2.0, June 2014: Reformatted for AsciiDoc. :toc: :numbered: :website: http://tigase.net :Date: 2010-04-06 21:16

To get server up and running you have to download from our site the most recent version of the binary package.

Unpack it with the following command:

On Unix like system:

    tar -xzvf tigase-server-x.x.x-bx.tar.gz

On MS Windows system use any application which can handle either zip files or tar.gz files and unpack server package to selected directory.

Sometimes after unpacking package on unix system startup script doesn’t have execution permissions. To fix the problem you have to run following command:

    chmod u+x ./bin/tigase.sh

As there are also other useful scripts you could just set executable bit for all of them at the same time:

    chmod u+x ./bin/*

Now all you need is Java 6 (1.6 beta2 at the moment) compliant virtual machine. You can run server from command line with simple command:

    ./bin/tigase.sh run etc/tigase.conf

You can see now a few messages with warning about missing configuration file and missin user repository file. These 2 files will be automaticaly created. Config file will be created just during first execution of the server and user repository file will be created when the first user is added to the system.

You should be able now to connect to the server with Jabber/XMPP client of your choice.

First parameter is a command, second parameter is a config file for startup script. Possible commands are:

- start - Starts server in background redirecting all console messages to separate log file.
- stop - Stops the last started server Be carefull with this command if the server has been stopped in different way but the script still thinks the server is running. The script detects that the server has been started by looking for tigase.pid file. Then it reads server PID from the file and sends kill signal to the process. It may happen that the server is not running but there is another process with this PID. If you know that you server is not running but the script claims it is, it means that the script finds old tigase.pid file. In such case to make it possible to start server again you should either remove the file manually or run script with zap command.
- run - Starts the server as foreground process with all console messages printed onto console. To stop the server simply press Ctrl-C. It does not create tigase.pid file.
- restart - Restarts currently running server. It simply calls the script first with stop command and then with start command.
- check - This commands simply prints all the settings which would be used to start or stop the server. It is strongly recommended to use this command before the first server run.

Config file for startup script simply sets number of environment variables with location of required components. Possible variables to set in this file are:

- JAVA_HOME - location of Java installation home directory. Must be set.
- TIGASE_HOME - location of Tigase installation home directory. By default script try to find this location by searching directories from the location where the script has been run.
- TIGASE_CONSOLE_LOG - file to which all console messages will be redirected if server is run in background. By default it will be: TIGASE_HOME/logs/tigase-console.log. If this file/directory is not writable by Tigase process all console messages will be redirected to /dev/null
- TIGASE_PID location of the file with server PID number. By default it will be TIGASE_HOME/logs/tigase.pid.
- TIGASE_CONFIG - location of the Tigase server config file. This is main config XML file. Not to be confused with startup script parameters file. If not set script trys to find it in following locations in given order: /etc/conf.d/tigase-server.xml, /etc/tigase-server.xml, /etc/tigase/tigase-server.xml or finally in TIGASE_HOME/etc/tigase-server.xml
- JAVA_OPTIONS - options for JVM like size of RAM allocated for the JVM, properties and so on.

You can now proceed to configuration section. Although in simple case installations most of default options should be correct sometimes you need to change server domain name if automatic detection didn’t work.

Prev |  | Next
Chapter 79. Tigase Server version 2.x | Home | Chapter 81. MySQL Database Use