Install personal Jabber Server on CentOS using ejabberd

Here a little doc to install a jabber server on CentOS machine.

eJabberd Installation

On your server type, as root user:

yum -y install ejabberd

Create an admin user for your server using the cli interface:

ejabberdctl register admin localhost yourpassword

Give to created user admin privileges. To do this modify the /etc/ejabberd/ejabberd.cfg

%% Admin user
{acl, admin, {user, "admin", "localhost"}}.

%% Hostname
{hosts, ["localhost"]}.

Now you can start the server:

/etc/init.d/ejabberd start

Create a user

From now you can execute any setting operation directly via the web interface, but... I prefer the cut&paste way. So... to add a new via cli, you can execute:

ejabberdctl register username yourdomain userpassword

changing username,userpassword and yourdomain with what you prefer.

By now you can connect using a jabber client to the configured server. By default the configured server port is 5222.

Configure DNS

If you want to expose your server using an host/dns name, you should configure your dns server adding:

Doc DNS: TTL IN SRV priority weight port target TTL IN SRV priority weight port target 86400 IN SRV 5 0 5222 86400 IN SRV 5 0 5269

Now you have an xmpp-server identified for your domain.

Via: [Source]("> "Source"), [Dns](">< "DNS")