Installation of packages
First the according Ubuntu packages are supposed to be installed:
aptitude install ejabberd
Customizing the setup
Next step is to customize two settings in /etc/ejabberd/ejabberd.cfg:
%% Admin user
{acl, admin, {user, "youruser", "yourdomain.tld"}}.
%% Hostname
{hosts, ["yourdomain.tld"]}.
The rest should basically fly by itself.
Now an administrative user has to be added. Is is done on the command line with:
ejabberdctl register youruser yourdomain.tld yourpassword
After this, the server can be started by the following line:
service ejabberd start
If all went well, now the administrative backend should be good to go. It is accessibly with this URL:
http://yourjabberhostname.yourdomain.tld:5280/admin
Customizing the DNS entry
In order to get your server compliant with most of the clients, your domain is supposed to offer the following SRV-entries (example shows bind zonefile entries):
yourjabberhostname IN A IP_of_jabberhost
_xmpp-client._tcp IN SRV 5 0 5222 yourjabberhostname.yourdomain.tld.
_xmpp-server._tcp IN SRV 5 0 5269 yourjabberhostname.yourdomain.tld.
_jabber._tcp IN SRV 5 0 5269 yourjabberhostname.yourdomain.tld.
Have fun with your individual jabber server!