zeldor.biz

Linux, programming and more

Copyright © 2023
Log in

XMPP bring jabber server to live

July 12, 2015 by Igor Drobot Leave a Comment

XMPP

Extensible Messaging and Presence Protocol (XMPP) is an open XML technology for real-time communication, which powers a wide range of applications. Monitoring such as Icinga notifications or alive ping from a mobile phone.

Installation of ejabberd instant messaging server for XMPP:

1
apt-get install ejabberd

apt-get install ejabberd

1
dpkg -l ejabberd

dpkg -l ejabberd

ejabberd 2.1.10-4+deb

Initial configuration to set FQDN and create admin user:

1
dpkg-reconfigure ejabberd

dpkg-reconfigure ejabberd

1
2
3
4
vim /etc/ejabberd/ejabberd.cfg
 
{hosts, ["xmpp.drobot.de"]}.
{acl, admin, {user, "id", "xmpp.drobot.de"}}.

vim /etc/ejabberd/ejabberd.cfg {hosts, ["xmpp.drobot.de"]}. {acl, admin, {user, "id", "xmpp.drobot.de"}}.

Generate self signed certificate:

1
2
openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 -keyout xmpp.drobot.de.key -out xmpp.drobot.de.crt
cat xmpp.drobot.de.crt xmpp.drobot.de.key > xmpp.drobot.de.pem

openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 -keyout xmpp.drobot.de.key -out xmpp.drobot.de.crt cat xmpp.drobot.de.crt xmpp.drobot.de.key > xmpp.drobot.de.pem

Set path to the self signed cert. in following configs:

1
2
3
starttls, {certfile, "/etc/ejabberd/xmpp.drobot.de.pem"}
{s2s_use_starttls, true}.
{s2s_certfile, "/etc/ejabberd/xmpp.drobot.de.pem"}.

starttls, {certfile, "/etc/ejabberd/xmpp.drobot.de.pem"} {s2s_use_starttls, true}. {s2s_certfile, "/etc/ejabberd/xmpp.drobot.de.pem"}.

Useful Munin Plugin for passive ejabberd monitoring:

jappix

Try also XMPP from anywhere with jappix – a self hosted web based client.

XMPP-Client for iPhone: ChatSecure
XMPP-Client for android: Xabber

Logging Module:

1
2
3
4
5
6
7
cd /usr/src
svn co https://svn.process-one.net/ejabberd-modules
cd ejabberd-modules/mod_log_chat/trunk/
bash -x build.sh
cp ebin/mod_log_chat.beam /usr/lib/ejabberd/ebin/
mkdir -p /var/log/ejabberd/chat
chown ejabberd:ejabberd /var/log/ejabberd/chat

cd /usr/src svn co https://svn.process-one.net/ejabberd-modules cd ejabberd-modules/mod_log_chat/trunk/ bash -x build.sh cp ebin/mod_log_chat.beam /usr/lib/ejabberd/ebin/ mkdir -p /var/log/ejabberd/chat chown ejabberd:ejabberd /var/log/ejabberd/chat

Enable logging module in “{modules” section:

1
2
vim /etc/ejabberd/ejabberd.cfg
{mod_log_chat,  [{path, "/var/log/ejabberd/chat"}, {format, html}]},

vim /etc/ejabberd/ejabberd.cfg {mod_log_chat, [{path, "/var/log/ejabberd/chat"}, {format, html}]},

Possible log formats: html or text

Filed Under: Linux Tagged With: ejabberd installation, Jabber, Jappix, Munin, Secure messaging, Xabber, XMPP

Categories

Archives

Tags

apache2 Apple arduino ARM Automation backup bash Cisco Cluster Corosync Database Debian Debian squeeze DIY DNS Fedora FTP Fun Icinga Ipv6 KVM Linux LVM MAC OS X Monitoring MySQL Nagios Nginx openSUSE OpenVPN PHP Proxy Python python3 qemu RAID rsync Samba security ssh Ubuntu virtualization Windows Windows 7 Wordpress

Leave a Reply

Your email address will not be published. Required fields are marked *