InstallGuide QuickStartGuide
Go up: InstallGuide
This guide is intended to get Jabberd 2 installed and running as quickly as possible:
Install with package system (fedora,centos,debian)
- Install packages
Install without package system
- Install OpenSSL
- Install Berkeley DB
- Install Libidn
- Create Jabber User and Group
- Create Directories for Data and Logging
- Install Jabberd 2
Configuration
- Configure Server
- Test Server
Jabberd 2 can use MySQL, PostgreSQL or Berkeley DB to store its data. MySQL is the recommended database for Jabberd 2; however, this guide suggests using Berkeley DB because it requires the least amount of configuration for Jabberd 2 data storage. See the Jabberd 2 Installation and Administrative Guide for a detailed guide to installing and configuring Jabberd 2.
yum install jabberd
FIXME
Jabberd 2 requires that OpenSSL (version 0.9.6b or higher) be installed prior to installing Jabberd 2. If OpenSSL version 0.9.6b is not installed on your system, see the OpenSSL site or Installing OpenSSL for Jabberd.
Jabberd 2 requires Berkeley DB version 4.1.24 or higher; if this is not installed on your system, see the Berkeley DB site or Installing Berkeley DB for Jabberd 2.
Consideration should be exercised when choosing a data store for a Jabberd 2 production server because converting from one database to another may be difficult.
Jabberd 2 requires Libidn version 0.3.0 or higher; if this is not installed on your system, see the GNU Libidn site or Installing Libidn for Jabberd 2.
You should create a specific jabber user and group to run the server:
su
groupadd jabber
useradd -g jabber jabber
Note that the above commands are intended as an example. The commands and parameters for adding a user and group may vary for your system. Consult your manuals if you have any doubt about these commands.
You should create directories for data, logging and PID's, and your jabber user will need read and write permissions on these directories.
Create a directory to store the Jabberd database files (as superuser):
mkdir -p /usr/local/var/jabberd/db
Create a directory to store Jabberd log files (as superuser):
mkdir -p /usr/local/var/jabberd/log
Create a directory to store Jabberd PID files (as superuser):
mkdir -p /usr/local/var/jabberd/pid
Change the ownership of the directories created above (as superuser). If you used the locations specified above, enter the command:
chown -R jabber:jabber /usr/local/var/jabberd
This section describes how to download, configure, build and install Jabberd 2 on your system.
Download the file jabberd-2.n.tar.gz from the Jabberd 2 Releases page, where "n" is the latest version of Jabberd 2.
Download the file referenced above into a convenient directory for building the installation files. At the time of writing, Jabberd 2 stable 3 is the latest version and is used in the examples below.
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
Change to the directory created above:
cd jabberd-2.0s3
./configure --enable-db --disable-mysql
The command above will configure your build to use Berkeley DB as the data store. You may also wish to enable debugging. To do this, add --enable-debug to the configuration options above. For help with configuration options, enter ./configure --help.
Build Jabberd buy running the command:
make
Switch to the super-user:
su
Run make install:
make install
Your Jabberd 2 installation is complete. Below is a listing of file locations for the default installation:
/usr/local/etc Jabberd Configuration Files
/usr/local/bin Jabberd Binaries (jabberd, c2s, resolver, router, s2s, sm)
The most basic Jabberd configuration (when using Berkeley DB) requires a total of 4 configuration edits:
1. Set hostname ID in c2s.xml 2. Set authreg module to use in c2s.xml 3. Set hostname ID in sm.xml 4. Set storage module to use in sm.xml
The configuration files are all found in /usr/local/etc/jabberd.
In c2s.xml edit the id tag under the section labelled local network configuration so that the id references a resolvable network name for your jabber server. For example, using the FQDN of somemachine.somedomain.com, your c2s.xml configuration would appear as below:
<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>
Further down in c2s.xml is a section labeled Authentication/registration database configuration. This is where the authreg data module is specified. Edit the module tag so that Berkeley DB is specified as the Backend module to use. Throughout Jabberd configuration, Berkely DB is abbreviated to db. Therefore, you should edit the module tag as below:
<!-- Authentication/registration database configuration -->
<authreg>
<!-- Backend module to use -->
<module>db</module>
At the top of sm.xml is the id setting for hostname. Edit the id tag with the same hostname specified in section A.1.6.1 above:
<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>
Further down in sm.xml is a section labeled Storage database configuration. This is where the storage data module is specified. Edit this section as below so that Berkely DB is specified as the storage data driver to use:
<!-- Storage database configuration -->
<storage>
<!-- By default, we use the MySQL driver for all storage -->
<driver>db</driver>
If you have created the logging and data directories specified above, you should be able to start your Jabberd 2 server and connect to it.
Start your Jabberd 2 server by using the start up script:
su
su jabber
/usr/local/bin/jabberd
If your server fails to start, you can start Jabberd 2 with the debug option (note that this requires building Jabberd 2 with the debug option — see section A.1.5.3 above):
/usr/local/bin/jabberd -D
You should now be able to connect to your Jabberd server, and create a new account. Your account name should be something like someuser@somemachine.somedomain.com. If you are unable to connect, make certain that the hostname used (sections A.1.6.1 and A.1.6.3) is resolvable from the machine on which the client is running.
Once your server is running, you may wish to configure it further. See especially Section 5, Common Configuration Tasks, for further information about Jabberd configuration.