Posted by Steve on Tue 9 Nov 2004 at 18:07
Jabber is an XML based cross platform chat and messenging server which is freely available. It runs on Linux, Solaris, and many other Unix variants. For a small office or a collection of offices it's a great way to allow people to chat without resorting to outside services such as MSN. This small guide gives a quick walk through of installing a server and setting up your first client on a Debian Unstable machine. Debian stable is handled almost identically, although the clients aren't available for it. Running the server itself on a stable machine isn't any different. The first thing to do is download and install the server:root@undecided:~# apt-get install jabberThis will download and install jabber, jabber-common and any other packages your system might need. The server will be started automatically at this point, so we need to stop it and update the configuration to work with your host. To stop the server run:
root@undecided:~# /etc/init.d/jabber stop Stopping jabberd: jabberd.Now we can look at the configuration files inside the directory /etc/jabber. The main thing that we need to setup is the hostname directive. The server itself is primarily configured via the XML file /etc/jabber/jabber.xml, but as a convience the startup script of the Debian package will make use of the file jabber.cfg as well, and this is where we'll set the name up. In a small office where you have your own DNS system it is useful to setup a hostname to refer to the system, this allows you to move machines without having to change any clients. I've used chat.my.company before for this purpse. In this case I'm just using the hostname of the current machine. So edit the file /etc/jabber/jabber.cfg to have your hostname:
# JABBER_HOSTNAME (which is then passed to jabberd in the -h switch) JABBER_HOSTNAME=undecided.my.flatNow we can start the server up:
root@undecided:~# /etc/init.d/jabber start Starting jabberd: jabberd.Connecting to the server involves downloading and installing a chat client. My favorite client is gabber for Linux, and Exodus for Windows. Other clients exist packaged for Debian including PSI. To install gabber, on a client machine, run:
apt-get install gabberThen once it's installed you will be shown a connection dialog. This has space for a username, a password, and a server name. Enter the username and password you wish to use and the name of the server you already setup. (In my case thats undecided.my.flat). Once you click the connect button you will see the following error message:
Gabber could not log you in. Would you like Gabber to try to create a new account on the selected Jabber server?Click 'Yes' and your account will be created. You will then see the main contact window which should show that you have received a new message from the server saying 'Welcome'. If you now move to another machine you can repeat the process to add another user. Finally you can add the users to each others contact list, called a roster in Jabber-speak. Click on the Actions menu and select Add Contact. Then choose Add this JabberID. Type in the ID of the user you wish to add in, remembering to add the hostname. For example:
steve@undecided.my.flatAll Jabber contacts have the form username@hostname - just like an email address, even though it isnt! Once the other person logs in and approves the addition you will be able to chat to them! The roster lists are all maintained upon the server side, in a directory beneath /var/lib/jabber named after the servers hostname. If you examine one of the ones you've created already you will see there is a section at the start for the username and password and some global options and then at the end there is a section at the end for the contacts. With a bit of scripting you can generate these files for all your users yourself and add each other to their groups, but that's a writeup for another day.
This article can be found online at the Debian Administration website at the following bookmarkable URL (along with associated comments):
This article is copyright 2004 Steve - please ask for permission to republish or translate.