- aptitude install ejabberd (for some reason apt-get didn’t work out that well);
- go to wherever you manage your DNS records and add a SVR record as mentioned here;
- edit /etc/ejabberd/ejabberd.cfg and add admin user as mentioned here .
All of these steps are to avoid placing hosts as localhost on your ejabberd.cfg file which could work but than you might have problems with clients trying to connect.