3. Install Jabberd 2

This section describes how to build and install Jabberd 2.

3.1. Download Jabberd 2

F Required File
Download the file jabberd-2.0sn.tar.gz from the Jabber Studio, where "n" is the latest stable version of Jabberd 2.

Download the file referenced above into a directory in /home for building the installation files. At the time of writing, Jabberd 2 stable release 3 is the latest version and is used in the examples below.

3.2. Extract Jabberd Installation Files

Change to the directory where you downloaded the file above and then extract the Jabberd 2 files by running the command:

      tar -zxvf  jabberd-2.0s3.tar.gz 

3.3. Configure the Jabberd Build

|| TODO: Try to rewrite config instructions to make them clearer. Maybe push some of the special configurations to the FAQ ||

Change to the directory created above:

      cd jabberd-2.0s3
O Optional: View Configuration Options
Prior to configuring Jabberd, you can view all configuration options by running the command:
      ./configure --help

This will provide a listing and syntax for setting configuration options. For example, you may choose to install Jabberd into a specific directory by using the --prefix=PREFIX option. By providing a PREFIX path, all Jabberd files will be installed under this directory. This may be useful if you are testing a new Jabberd installation. Another useful option is --enable-debug. This option allows Jabberd to provide detailed debugging information; however, it should be used carefully on production systems.

I Important: Configuration Options Have Changed with Stable Release 3
Jabberd 2 stable 3 introduced changes in the parameters for the configuration script. The information below pertains to Jabberd 2 stable 3 and above.
I Important: Use Explicit Options for OpenSSL and Libidn
It is recommended that Jabberd 2 be configured with explicit options for OpenSSL and Libidn. These packages are technically optional. Therefore, configure may build Jabberd 2 without them if their libraries and headers are not found when configure us run.
P Parameters: Application Data Package and Authentication Data Package
The authentication and storage packages should be specified with the --enable- option. Options are --enable-mysql, --enable-pgsql, --enable-db, --enable-pam or --enable-ldap. Although --enable-mysql is the default, it is recommended that this be specified if MySQL is to be used. For example, this command would be used to enable MySQL as the authentication and storage package without debugging support:
      ./configure --enable-mysql --enable-ssl --enable-idn

The following command would be used to configure Jabberd to use Berkeley DB for both storage and authentication and to enable debugging:

      ./configure --enable-db --enable-debug --enable-ssl --enable-idn

If your one of the Jabberd prerequisites is installed in a nonstandard location, you will need to specify this location when you run configure. Specify alternate header paths with the --with-extra-include-path option and alternate library paths with the -with-extra-library-path option. Multiple paths, separated by a colon, may be specified. For example, if OpenSSL and MySQL were installed under /usr/local, you might configure with the command:

      ./configure --enable-pgsql --enable-ssl --enable-idn \
      --with extra-include-path=/usr/local/include:/usr/local/include/mysql \
      --with-extra-library-path=/usr/local/lib:/usr/local/lib/mysql
I Important: Incorrect Parameters Are Ignored
Jabberd ignores incorrect configuration parameters. Thus, an incorrectly entered configuration parameter might lead to a successful, however incorrect, Jabberd configuration. Run ./configure --help if in doubt.
I Important: Redhat 9 Configuration
Building Jabberd 2 on Redhat 9 requires special configuration because Redhat 9 ships with its own version of Kerberos. For more details, see the FAQ about Redhat 9.

If you wish to use the default configuration, simply run the configuration command:

      ./configure

This will configure Jabberd to use MySQL and to install to /usr/local. If you receive errors, you may wish to check the FAQ where you will find several system-specific work arounds.

3.4. Build Jabberd

Build Jabberd by running the command:

      make

3.5. Install Jabberd

Switch to the super-user:

      su

Run make install:

      make install

3.6. Default File Locations

Your Jabberd 2 installation is complete. Below is a listing of file locations for the default installation:

      /usr/local/etc/jabberd     Jabberd Configuration Files
      /usr/local/bin       Jabberd Binaries (jabberd, c2s, resolver, router, s2s, sm)

3.7. Set Ownership of Configuration Files

Jabberd configuration files contain passwords; therefore, you should set ownership and permissions on these files so that they are only readable by your jabber user and writable by root only. Using the location of your configuration files and your jabber user, set ownership of these files:

      chown -R root:jabber /usr/local/etc/jabberd/*

Then, set permissions on these files so that others can neither read from- or write to them:

      chmod -R 640 /usr/local/etc/jabberd/*

Now, only your jabber user and super-user will be able to read and edit your configuration files.

O Optional: Create Symlink for Configuration Files
If you used the default file locations when installing Jabberd, you may wish to create a symlink (as superuser) in /etc for the configuration files. This will make it easier to find and edit them:
      ln -s /usr/local/etc/jabberd/ /etc/jabberd

Jabberd 2 is now installed. Continue to the next section to being configuring your installation.

 

Back

Up

Next

© 2003 Will Kamishlian and Robert Norris

This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/1.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.

Creative Commons License