![]() |
|
![]() |
||||||||
![]() ![]() ![]() |
||||||||||
![]() |
Jabber Server 1.4 HOWTOContents
IntroductionJabber is an XML-based, client-server, open-source presence and messaging system that uses a network of distributed servers to pass data between servers and ultimately to Jabber clients. This document provides information about installation and configuration of version 1.4 of the Jabber server. If you have been running a 1.0 or 1.2 server, now is the time to upgrade, because the 1.4 codebase is superior to earlier versions and future development regarding transports and other add-ons will focus on compatibility with the 1.4 server. For detailed technical information about Jabber, please see the References section of this document. This document received its last major update on 2001-02-07. Since that time, additional information about the 1.4 server has been added to the Jabber FAQ, so check there if you're stuck on a problem. On 2001-09-08, updated information about installing the AIM and ICQ Transports was added. System RequirementsThe Jabber server 1.4 was developed mainly on Linux, with additional testing on FreeBSD and Solaris. It has been successfully built on AIX, IRIX, and several other flavors of Unix. Hardware requirements for installation are minimal: the server has been installed and run on early Pentiums. A typical install for an intranet or small website might be a Pentium workstation with 256 or 512 megs of RAM running Linux. Note that if you are running Linux, you will need to modify some settings in the /proc filesystem to make it support more than 1024 simultaneous connections (consult your Linux documentation for how to do this). Server InstallationThe 1.4 server can be downloaded at http://download.jabber.org/dists/1.4/final/. This includes all the core code for messaging and presence within Jabber. Additional components, such as conferencing (a.k.a. groupchat), the Jabber User Directory, and transports to other IM services, are contained in the same directory and will be covered later in this document. The build process for the Jabber server just keeps getting easier, thanks to the hard work of the core team and contributions from the volunteers who have tested the installation process on Solaris, AIX, Tru64, and so on. The only file you need to download and install is jabber-1.4.tar.gz, available at http://download.jabber.org/dists/1.4/final/. To install it, do the following:
Note: if you are running Solaris or some other non-GNU system, be sure to use GNU make, not your native version of make. You will probably also need to install GNU pth as well. And if you are running Red Hat 7, do yourself a favor and install the crucial update related to problems with "gcc 2.96". Server ConfigurationThe core Jabber server should now be installed on your system. The next step is to configure the server so that you can run it. Most of the configuration happens in a file named jabber.xml, which contains a lot of comments that help you understand what each configuration option does. Since things are explained quite well in jabber.xml, the only changes we'll make here are the ones you need in order to get the server running. So open jabber.xml in your favorite text editor and do the following:
Because the Jabber server stores user "rosters" on the filesystem (specifically, in a subdirectory of the jabber-1.4/spool/ directory), you need to create a writable subdirectory of spool/ that has the same name as your hostname. So if the hostname of your Jabber server is jabber.foobar.com, you will need to create a directory jabber-1.4/spool/jabber.foobar.com/ that is writable by the user who runs the server. So who is this "user who runs the server"? Well, ideally it's you. But certainly it's not root! As I'm sure you know, it's a security hazard to run any major piece of software (including the Jabber server) as root! You can change the ownership rights to the entire Jabber server directory by typing, as root, something like chown -R myusername.myusergroup /path/to/jabber/. OK, now that you're practicing safe computing, you can fire up the Jabber server: The Jabber server should now be running on your machine. You can now connect to the server using your favorite Jabber client (see http://www.jabbercentral.com/clients/ for a list). Adding ServicesWell, Jabber is pretty cool all by itself, but one of the main reasons people are interested in Jabber, and the 1.4 server in particular, is the fact that Jabber has additional services such as the "transports" that enable Jabber users to exchange messages and presence with users of other instant messaging services. In addition to conferencing (a.k.a. groupchat) and the Jabber User Directory (JUD), the four transports that currently exist in the Jabber world connect to AOL Instant Messenger (AIM), ICQ, MSN Messenger Service (MSN), and Yahoo! Messenger (Yahoo). We'll cover conferencing and JUD first, then delve into the transports. Note #1: Just as with your base hostname, in order to get these services to work you need to make sure that each relevant subdomain (e.g., aim.yourdomain.com) is a fully qualified domain name! Note #2: For each component discussed below, the first <service/> section related to the component must be included in the <browse/> section of your jabber.xml -- this <service/> element identifies the component as something that a user can browse to and interact with (e.g., by registering with it). The actual definition of this component, where you point to a .so file or link off to a separate XML config file, must not go inside the <browse/> section -- usually I recommend that you put the service definitions right before the closing </jabber> tag at the end of the file just to make sure that they are not within the <browse/> element. If you are confused about this, please refer to the XML configuration file examples I have posted at http://www.saint-andre.com/jabber/xml/. Adding ConferencingThe conferencing module has been rewritten specifically to work with the 1.4 server, so forget everything you ever knew about groupchat! (D.J. Adams has written a helpful groupchat roundup to help you sort things out.) First, note that if you want your conference rooms to be accessible to users of other Jabber servers, the sub-domain conference.your.domain.name must be resolvable to a DNS address (probably to the same IP as your.domain.name). You may need to have your local DNS tables updated with this information. If you're using a dynamic DNS service like dyndns.org, make sure you enable the wildcard option so that subdomains will be resolved. The new conferencing code is available at http://download.jabber.org/dists/1.4/final/. As of this writing, the current version is 0.4, so download conference-0.4.tar.gz to your jabber-1.4/ directory. Then do the following:
The conferencing code should now be installed on your system (you'll know if that's the case if you see a conference.so file in the conference-0.4/ directory). The next step is to configure your Jabber server to run conferencing, so open jabber.xml and make the following edits... First, in what will become a familiar pattern as you add services on top of your core server, you need to identify the conferencing service in the <browse/> section of jabber.xml so that users of your server can discover that you offer conferencing. You do this by adding the following line to the <browse/> section of your jabber.xml file:
Of course, you'll need to replace 'localhost' with the hostname of your Jabber server. Next, you need to actually define the service you're offering by adding a <service/> element to jabber.xml (I usually put it right after the <service/> definition for the s2s component).
Here again you'll need to replace 'localhost' with the hostname of your Jabber server. OK, now you're ready to restart the Jabber server and take conferencing for a spin! You should see "Conferencing" as a service on the server when you connect with a Jabber client. You should also be able to type a conference room name into the interface for joining a conference room and then join that room. Invite a friend or two into a conference room and jabber away! Adding JUDJUD stands for Jabber User Directory. The main instance of JUD lives at jabber.org, and anyone can add their name to the user database there so that people can find them (note that JUD is an opt-in database, user information is never added to JUD automatically on registration). In addition to the JUD instance at jabber.org (or to supersede it), you can define a JUD instance that lives on your Jabber server so that your users can register with a directory on your server. To do that, you can use the re-written JUD code that is available at http://download.jabber.org/dists/1.4/final/. Here's how:
The JUD code should now be installed on your system (you'll know if that's the case if you see a jud.so file in the jud-0.4/ directory). The next step is to configure your Jabber server to run JUD, so open jabber.xml and make the following edits... As we saw with conferencing, first you need to identify the Jabber User Directory in the <browse/> section of jabber.xml so that users of your server can discover that you have an instance of JUD on your server (of course replacing 'localhost' with the hostname of your Jabber server as you go along). You do this by adding the following line to the <browse/> section of your jabber.xml file:
Here again, you need to actually define the service you're offering by adding a <service/> element to jabber.xml (a good place for this would be right after the <service/> definition for conferencing that we added above).
Restart your Jabber server and give JUD a try by adding your own user information to your JUD instance. Adding the AIM TransportThe following instructions will not yield a working AIM Transport, because since the time this HOWTO was written, AOL made serious protocol changes in order to block Jabber servers from connecting to the AIM network. I will endeavor to update these instructions as soon as possible. Although aim-transport-0.9.0 was released at the same time as the 1.4 server, developer Thomas Muldowney has since released aim-transport-0.9.5, which fixes a number of bugs in 0.9.0. So the code you want to download and install is located at http://download.jabber.org/dists/transports/aim-transport/. Download aim-transport-0.9.5.tar.gz to your jabber-1.4/ directory and then do the following:
The AIM Transport code should now be installed on your system (you'll know if that's the case if you see a aimtrans.so file in the aim-transport-0.9.5/ directory). The next step is to configure your Jabber server to run the AIM Transport, so it's time for more surgery on jabber.xml... Once again, first you need to identify the AIM Transport in the <browse/> section of jabber.xml so that users of your server can discover that you have the AIM Transport installed on your server (of course replacing 'localhost' with the hostname of your Jabber server as you go along). You do this by adding the following line to the <browse/> section of your jabber.xml file:
Here again, you need to actually define the service you're offering by adding a <service/> element to jabber.xml (a good place for this would be right after the <service/> definition for JUD that we added above).
Restart your Jabber server and register with the AIM transport to test it out. Adding the ICQ TransportFrom http://download.jabber.org/cvs/, download icq-transport.tgz (this is actually 0.9.1, which contains improvements over 0.9 -- the latter no longer works with the ICQ network because of protocol changes by ICQ) to your jabber-1.4/ directory and then do the following:
The ICQ Transport code should now be installed on your system (you'll know if that's the case if you see a icqtrans.so file in the icq-transport/ directory). The next step is to configure your Jabber server to run the ICQ Transport, so open jabber.xml once again... First let's identify the ICQ Transport in the <browse/> section of jabber.xml so that users of your server can discover that you have the ICQ Transport installed on your server (of course replacing 'localhost' with the hostname of your Jabber server as you go along). You do this by adding the following line to the <browse/> section of your jabber.xml file:
Note: Including the jabber:iq:search line above caused me to get a 405 Not Allowed error when I tried to register with the ICQ Transport, so you may not want to include it. However, this was platform-specific: including search worked on Red Hat 7 for me, but not on Debian. Here again, you need to actually define the service you're offering by adding a <service/> element to jabber.xml (a good place for this would be right after the <service/> definition for the AIM Transport that we added above).
Note: If you deleted the jabber:iq:search line in your <browse/> section, make sure you delete the <search/> line above. Also, note that there is a typo in the README, it has </port> instead of </ports>! Also, if you are using the ICQ Transport behind a firewall and are experiencing problems with delivery of messages to users within the firewall, you may want to add a <disable-tcp/> tag right after the <prime/> entry, as explained in a JADMIN post from ICQ Transport developer Schuyler Heath. Restart your Jabber server and register with the ICQ transport to test it out. And if you expect to have many people using the ICQ Transport on your Jabber server, make sure you change the <prime/> entry to some number higher than 37! Adding the MSN TransportFrom http://download.jabber.org/dists/1.4/final/, download msn-transport-1.1.tar.gz to your jabber-1.4/ directory and then do the following:
The MSN Transport code should now be installed on your system (you'll know if that's the case if you see a msntrans.so file in the msn-transport-1.1/ directory). The next step is to configure your Jabber server to run the MSN Transport, so open jabber.xml once again... First let's identify the MSN Transport in the <browse/> section of jabber.xml so that users of your server can discover that you have the MSN Transport installed on your server (of course replacing 'localhost' with the hostname of your Jabber server as you go along). You do this by adding the following line to the <browse/> section of your jabber.xml file:
Here again, you need to actually define the service you're offering by adding a <service/> element to jabber.xml (a good place for this would be right after the <service/> definition for JUD that we added above).
Restart your Jabber server and register with the MSN transport to test it out. Adding the Yahoo TransportFrom http://download.jabber.org/dists/1.4/final/, download yahoo-transport-0.8-1.4.tar.gz to your jabber-1.4/ directory and then do the following:
The above instructions worked fine for me on RedHat. However, in order to get Yahoo Transport to compile on Debian, I needed to edit jabberd/jabberd.h so that the include statement for pth.h explicitly pointed to pth-1.3.7/pth.h, as so:
I've heard that the Yahoo Transport is difficult to build on Solaris. For Solaris 8 on Intel you might need to add -fPIC to the CFLAGS variable in the Makefile for yahootrans.a and then do 'make'. For Solaris 2.6, 2.7, and 8 on Sparc, you might want to try a pre-built binary I've placed on my website at http://www.saint-andre.com/jabber/yahoo_sol6.tar.gz. The Yahoo Transport code should now be installed on your system (you'll know if that's the case if you see a yahootrans.so file in the yahoo-transport-0.8-1.4/src/ directory). The next step is to configure your Jabber server to run the Yahoo Transport, so open jabber.xml once again... First let's identify the Yahoo Transport in the <browse/> section of jabber.xml so that users of your server can discover that you have the Yahoo Transport installed on your server (of course replacing 'localhost' with the hostname of your Jabber server as you go along). You do this by adding the following line to the <browse/> section of your jabber.xml file:
Here again, you need to actually define the service you're offering by adding a <service/> element to jabber.xml (a good place for this would be right after the <service/> definition for JUD that we added above).
Finally, note that in order for the Yahoo transport to work, you will need to make sure that you can connect to the following hosts from your server:
Restart your Jabber server and register with the Yahoo transport to test it out. Running Services in Separate ProcessesThe foregoing discussion assumed that you wanted to run conferencing, JUD, and the transports in the same jabberd process as the main server. While that will get you up and running quickly, you might need a more scalable solution or just want to isolate these services from your core server (e.g., enabling you to stop and start services without stopping the core server). Jabber 1.4 makes this fairly easy by enabling you to run each service in its own process. I'll be adding more to this section soon, but for now you might want to look at the XML config files that I'm using on my private Jabber server at jabber.to. I've put these files on the web at http://www.saint-andre.com/jabber/xml/ for your reading pleasure. To run these processes, I first start the main jabberd by typing ./jabberd/jabberd -c multiple.xml and then start up each of the child processes by typing ./jabberd/jabberd -c aimtrans.xml and such. More detailed information to follow! Upgrading from Earlier VersionsNow is the time to upgrade, because the 1.4 is the best Jabber server so far and will be the focus of future development. To upgrade from a 1.0 or 1.2 server, you'll probably want to do the following:
That's it! Getting AssistanceFor help with installation and configuration issues, try the following:
If you cannot get answers to your questions on jdev or the JADMIN mailing list, feel free to contact the author of this document via email or Jabber at stpeter@jabber.org. Providing FeedbackIf you find bugs in the Jabber server, please send an email with detailed information about your platform and the behavior of the server to bugs@jabber.com. For more general feedback about Jabber, an email to the JDEV list for Jabber developers (http://mailman.jabber.org/listinfo/jdev/) is probably the best way to proceed. AcknowledgementsThanks above all to the Jabber developers who created the code you're running, especially to the following 1.4 heroes:
Thanks also to the members of the Jabber mailing lists for their answers to questions posted and for putting the answers to the test on computers across the globe. ReferencesYou may find the following references helpful: Copyright InformationThis document is copyright © 2001 by Peter Saint-Andre Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation, with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. You may obtain a copy of the GNU Free Documentation License from the Free Software Foundation by visiting http://www.fsf.org/ or by writing to:
|
![]() |
|
© Copyright 2000 Jabber.org - All Rights Reserved |