This article explains how to install and use Openfire and Spark. Openfire is a Jabber/XMPP server, and Spark is a Jabber/XMPP client; both are written in Java.
Read it at HowtoForge
Note: The installation that we describe below has been made on Debian 4.0 (Etch) with the following elements already installed:
Debian 4.0 (etch), a base just
MySQL server 5.0