Debian and Ubuntu packaging for ejabberd snapshots.
Latest commit 0a602b7 Mar 1, 2009 @metajack Updated for new snapshot.
Failed to load latest commit information.
po Initial import. Jan 16, 2009
scripts Initial import. Jan 16, 2009
README.Debian Initial import. Jan 16, 2009
changelog Updated for new snapshot. Mar 1, 2009
compat Initial import. Jan 16, 2009
config Initial import. Jan 16, 2009
control Initial import. Jan 16, 2009
control.in Initial import. Jan 16, 2009
copyright Initial import. Jan 16, 2009
default Initial import. Jan 16, 2009
dirs Initial import. Jan 16, 2009
doc-base Initial import. Jan 16, 2009
docs Initial import. Jan 16, 2009
ejabberd.8 Initial import. Jan 16, 2009
ejabberd.cfg Initial import. Jan 16, 2009
ejabberdctl.8 Initial import. Jan 16, 2009
examples Initial import. Jan 16, 2009
inetrc Initial import. Jan 16, 2009
init.d Initial import. Jan 16, 2009
install Initial import. Jan 16, 2009
logrotate Initial import. Jan 16, 2009
manpages Initial import. Jan 16, 2009
postinst Initial import. Jan 16, 2009
postrm Initial import. Jan 16, 2009
prerm Initial import. Jan 16, 2009
rules Initial import. Jan 16, 2009
templates Initial import. Jan 16, 2009

README.Debian

The package always makes a backup of the ejabberd database if it's running
when it is upgraded or removed. The backup files are stored in
/var/backups/ejabberd-<timestamp>.* directory.


The package installs ejabberd Erlang headers into /usr/lib/ejabberd/include
directory. To build a module using these headers, as usual include them using
    -include_lib("ejabberd/include/headername.hrl").
and compile the module using -pa option to add ejabberd path to a search list
    erlc -pa /usr/lib/ejabberd/ebin module.erl

Alternatively, include headers as
    -include("headername.hrl").
and add option -I /usr/lib/ejabberd/include to erlc command line.


The ejabberd daemon which is run in init.d script is owned by user ejabberd,
so it cannot bind to privileged ports (below 1024). The error message in
/var/log/ejabberd/ejabberd.log looks similar to the following:

E(<0.242.0>:ejabberd_listener:80):
                 Failed to open socket for {443,
                                            ejabberd_c2s,
                                            [{access,c2s},
                                             {max_stanza_size,
                                                 65536},
                                             starttls,
                                             {certfile,
                                                 "/etc/ejabberd/ejabberd.pem"},
                                             {shaper,
                                                 c2s_shaper}]}: eacces

If you want ejabberd to listen for example port 443 you could redirect it to
port 5222 (the default XMPP port) by a firewall rule. For example:

iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-port 5222


The ejabberd daemon uses Erlang database Mnesia. Even if it's configured for
using ODBC it uses Mnesia for some data (privacy lists et.) and runtime tasks
(keeping routing table etc.). Mnesia is a multi-master database, and it tightly
bounds to a hostname where it's working. Therefore, if you change computer
hostname then ejabberd will stop working.

If you don't have a current database backup then run ejabberd (attached to the
terminal, otherwise you'll not be able to backup database and quit) by

/usr/sbin/ejabberd --node ejabberd@oldhostname

and in the Erlang shell prompt call

(ejabberd@oldhostname)1> mnesia:backup("/tmp/ejabberd_at_oldhostname.backup").

(note the trailing fullstop). Then stop ejabberd by typing

(ejabberd@oldhostname)1> q().

Now you have the latest Mnesia database backup.

After that run a new Erlang shell by

erl -pa /usr/lib/ejabberd/ebin

and convert the backup file to a new hostname:

1> mnesia_convert:change_node_name('ejabberd@oldhostname',
				   'ejabberd@newhostname',
				   "/tmp/ejabberd_at_oldhostname.backup",
				   "/tmp/ejabberd_at_newhostname.backup").

2> q().

Then use file /tmp/ejabberd_at_newhostname.backup to restore ejabberd database
as it is described in ejabberdctl manual page.


Torsten Werner <twerner@debian.org>,
Sergei Golovan <sgolovan@debian.org>      Fri, 15 Feb 2008 10:23:59 +0300