4. Basic Configuration

This section provides a quick road map for the most basic configuration and testing of your Jabberd 2 installation. Basic setup for Jabberd 2 consists of these three steps:

  1. Set Host Name (sm.xml and c2s.xml)
  2. Provision and Configure for Storage and Authentication Package(s)
  3. Test Server

Jabberd 2 is configured via its six XML files. For default installations, these configuration files can be found in /usr/local/etc/jabberd/, and they are accessible from /etc/jabberd if you created the symlink for this directory. Note that this section is easier to complete if you gather the required information in Section 2 beforehand.

4.1. Set Host Name in sm.xml and c2s.xml

The first step in basic configuration consists of setting the hostname in sm.xml and c2s.xml.

P Parameter: Hostname
Your server hostname (network ID) must be set in both c2s.xml and sm.xml so that the ID provides a network resolvable reference for your server. In c2s.xml this ID is found under the heading labeled Local network configuration (approx. line 63), and in sm.xml this ID is found under Session manager configuration (line 1). Edit sm.xml and c2s.xml so that this ID references your server.

In sm.xml :

      <!-- Session manager configuration -->
      <sm>
        <!-- Our ID on the network. Users will have this as the domain part of
             their JID. If you want your server to be accessible from other
             Jabber servers, this ID must be resolvable by DNS.s
             (default: localhost) -->
        <id>somemachine.somedomain.com</id>    

In c2s.xml :

      <!-- Local network configuration -->
      <local>
        <!-- Who we identify ourselves as. This should correspond to the
             ID (host) that the session manager thinks it is. You can
             specify more than one to support virtual hosts, as long as you
             have additional session manager instances on the network to
             handle those hosts. The realm attribute specifies the auth/reg
             or SASL authentication realm for the host. If the attribute is
             not specified, the realm will be selected by the SASL
             mechanism, or will be the same as the ID itself. Be aware that
             users are assigned to a realm, not a host, so two hosts in the
             same realm will have the same users.
             If no realm is specified, it will be set to be the same as the
             ID. -->
        <id>somemachine.somedomain.com</id>        

As the c2s.xml file notes, this is the hostname that will be appended to your user names to create Jabber ID's, and it must be resolvable via DNS for Jabberd to be accessible via the Internet.

N Note
You may use just a domain name (somedomain.com) for your Jabberd 2 network ID if your DNS is configured properly to resolve that ID to your server. See Section 5.7. for information about setting up DNS SRV records for Jabberd 2.

4.2. Provision and Configure for Storage and Authentication Package(s)

Getting Jabberd 2 to work with your choice of external storage and authentication packages involves these steps:

  1. Provision external package(s) to work with Jabberd 2
  2. Configure sm.xml for your choice of storage package
  3. Configure c2s.xml for your choice of authentication package

Most Jabberd 2 installations rely on a single package, such as MySQL, to provide both storage and authentication services. If your installation relies on a single package, you will need to configure this package for Jabberd 2 and then enter similar connection details in both sm.xml and c2s.xml.

P Parameters: Data Storage and Authentication Packages
Follow the guide to complete relevant subsections for your choice(s) of storage and authentication packages. (Berkeley DB, MySQL or PostgreSQL for storage. Berkeley DB, MySQL, PostgreSQL, PAM or OpenLDAP for authentication.)

Start by jumping to your selection of external storage package:

You will then be guided to continue on to provision (if necessary) and configure your authentication package. Once your external packages are prepared, and Jabberd is configured to use them, you will guided to Server Testing.

 

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