How to Install and configure Ejabberd 2.X XMPP server on Centos 6.5 64bit

Login as root

Download EPEL
rpm -ivh epel-release-6-8.noarch.rpm

yum install ejabberd

Modify the configuration file
vi /etc/ejabberd/ejabberd.cfg
{hosts, ["localhost","yourserverip/domain"]}.
{acl, admin, {user, "adminusername", "yourserverip/domain"}}

Kindly add ports in iptables
iptables -I INPUT -ptcp --dport 5280 -j ACCEPT
iptables -I INPUT -ptcp --dport 5222 -j ACCEPT
service iptables save
service iptables restart

Add this service at boot time.
chkconfig ejabberd on
Start this service
service ejabberd start

Kindly add admin user and password
ejabberdctl register adminusername yourserverip/domain password#2014

Open web browser add the url
add username eg adminusername and password eg password#2014

Copy from: