Here’s a quick guide to install a jabber server on CentOS machine.
eJabberd Installation#
On your server type, as root user:
yum -y install ejabberdCreate an admin user for your server using the cli interface:
ejabberdctl register admin localhost yourpasswordGrant the 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 startCreate a user#
You can perform all configuration via the web interface, but I prefer the command line. So, to add a new user via CLI, you can execute:
ejabberdctl register username yourdomain userpasswordreplacing 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:
_xmpp-client._tcp.example.net. TTL IN SRV priority weight port target
_xmpp-server._tcp.example.net. TTL IN SRV priority weight port target
_xmpp-client._tcp.example.net. 86400 IN SRV 5 0 5222 example.net.
_xmpp-server._tcp.example.net. 86400 IN SRV 5 0 5269 example.net.Now you have an xmpp-server identified for your example.net domain.