This guide is intended to get Jabberd 2 installed and running as quickly as possible:
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.
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:
c2s.xmlc2s.xmlsm.xmlsm.xml The configuration files are all found in /usr/local/etc/jabberd.
c2s.xml 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>
Note that this id must be resolvable by the clients that will be connecting to your Jabberd server. Using an IP address as the id should work; however, this is strongly discouraged.
c2s.xml 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>
sm.xml 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>
sm.xml 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.
./configure needs --enable-db --2004/06/30 10:30 PST
Following the instructions on this page with jabberd-2.0s3, the c2s module would fail at runtime with the error about db not being a valid auth module. After a few hours of poking around, I discovered that I needed to add the --enable-db flag to the ./configure statement.
Other than that, it was a great walkthrough, and it took me just a few minutes to get jabberd up and running!
Re: ./configure needs --enable-db --Will, 2004/07/01 9:37 PST
Thanks. I've updated the above to reflect the changes regarding the new release.
RedHat EL 3 - needed --disable-mysql --2004/07/14 06:20 PST
With RedHat EL 3 I needed to configure with --disable-mysql
I used the Quick Start documentation. The 2.0s3 server still doesn't work.
Re: RedHat EL 3 - needed --disable-mysql --Will, 2004/07/14 06:36 PST
Thanks for pointing that out. I'm still catching up with 2.0 s3 changes. As for it not running, I'll try testing the Quick Start guide today or tomorrow if I have the time. I wish I had a clean box to try it out on.
autoconf complains of no db even when Berkeleydb installed on redhat 9 --2004/07/30 22:33 PST
When Autoconf does its tests, it returns an error under redhat9. Berkeley DB must be compiled with the following variable set, so issue the following just before running ./configure for the DB:
export LDFLAGS="-lpthread"
After compiling and installing db that way I was able to autoConfigure jabberd.
what happened to the RAW packet communication test that jabberd is running? --2004/08/27 00:22 PST
came here to find out a RAW xml packet I could send to the server to do something interesting to test that it is indeed functional.... thought it used to be here. Maybe was for ver 1.4? otherwise great wiki
© 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.
|
|
|
|
![]() |