sudo apt-get install ejabberd
sudo /etc/init.d/ejabberd stop
nano /etc/ejabberd/ejabberd.yml
change this lines to
%% Admin user
{acl, admin, {user, " ", "localhost"}}.
to
{acl, admin, {user, "desireadminuserid", "desiredomain "}}.
to:
change this line:
%% Hostname
{hosts, ["localhost",]}.
to:
{hosts, ["localhost", "desiredomain","desiredomain.com"]}.
in some config files that is like below , in this cases
add desiredomain to hosts
this mean change this lines:
hosts:
- "localhost"
to:
hosts:
- "localhost"
- "desiredomain"
- "desiredomainipadd"
set password for admin
sudo ejabberdctl register admin desiredomain password
check if hostname is set to desiredomain
nano /etc/hostname
set it to
desiredomain.com
check if /etc/resolv.conf has this line
search desiredomain.com
check if /etc/hosts has this line:
127.0.0.1 desiredomain desiredomain.com
service networking restart
start ejabberd to check errors
ejabberdctl live
some errors:
mnesia domain mismatch
solution for first setup
remove all mnesia database files
stop ejabberd
rm -rf /var/lib/ejabberd/*
ejabberdctl live