ejabberd
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
ejabberd [2008/05/21 11:03] – Get the menu working in the ejabberd dbs | ejabberd [2010/09/06 13:06] (current) – Delete obsolete page dbs | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | OpenSRF comes with a custom built Jabber server called ChopChop. For testing purposes and/or systems with small loads, ChopChop works quite well. It's extremely simple and fast. ChopChop has a number of drawbacks, however, for large server clusters. (E.g. [[http:// | ||
- | |||
- | ====== Quick Install ====== | ||
- | |||
- | Most systems have Ejabberd packages. | ||
- | |||
- | ===== Config ===== | ||
- | |||
- | Installation should provide you with an '' | ||
- | |||
- | - Change the hosts section as appropriate. | ||
- | - Change any '' | ||
- | - Change any " | ||
- | - Change '' | ||
- | - Comment out the '' | ||
- | - Should look something like this: '' | ||
- | - Optional: | ||
- | |||
- | |||
- | ==== Our default Debian config with the above changes, minus some commented out lines ==== | ||
- | |||
- | * Note: Any line beginnging with a " | ||
- | |||
- | |||
- | < | ||
- | % Users that have admin access. | ||
- | {acl, admin, {user, "" | ||
- | |||
- | % Local users: | ||
- | {acl, local, {user_regexp, | ||
- | |||
- | % Only admins can use configuration interface: | ||
- | {access, configure, [{allow, admin}]}. | ||
- | |||
- | % Every username can be registered via in-band registration: | ||
- | {access, register, [{allow, all}]}. | ||
- | |||
- | % None username can be registered via in-band registration: | ||
- | %{access, register, [{deny, all}]}. | ||
- | |||
- | % After successful registration user will get message with following subject | ||
- | % and body: | ||
- | {welcome_message, | ||
- | | ||
- | " | ||
- | "For information about Jabber visit http:// | ||
- | % Replace them with ' | ||
- | %{welcome_message, | ||
- | |||
- | % Only admins can send announcement messages: | ||
- | {access, announce, [{allow, admin}]}. | ||
- | |||
- | |||
- | % Only non-blocked users can use c2s connections: | ||
- | {access, c2s, [{deny, blocked}, | ||
- | | ||
- | |||
- | % Set shaper with name " | ||
- | {shaper, normal, {maxrate, 500000}}. | ||
- | |||
- | % Set shaper with name " | ||
- | {shaper, fast, {maxrate, 500000}}. | ||
- | |||
- | % For all users except admins used " | ||
- | {access, c2s_shaper, [{none, admin}, | ||
- | {normal, all}]}. | ||
- | |||
- | % For all S2S connections used " | ||
- | {access, s2s_shaper, [{fast, all}]}. | ||
- | |||
- | % Admins of this server are also admins of MUC service: | ||
- | {access, muc_admin, [{allow, admin}]}. | ||
- | |||
- | % All users are allowed to use MUC service: | ||
- | {access, muc, [{allow, all}]}. | ||
- | |||
- | % This rule allows access only for local users: | ||
- | {access, local, [{allow, local}]}. | ||
- | |||
- | |||
- | % Authentication method. | ||
- | % this line: | ||
- | {auth_method, | ||
- | |||
- | % Host(s) name: (replace for your hostname(s)) | ||
- | % Old {host, " | ||
- | {hosts, [" | ||
- | |||
- | % Default language for server messages | ||
- | {language, " | ||
- | |||
- | % Listened ports: | ||
- | {listen, | ||
- | % Ordinary client-2-server service | ||
- | | ||
- | {max_stanza_size, | ||
- | starttls, {certfile, "/ | ||
- | {shaper, c2s_shaper}]}, | ||
- | |||
- | % SSL-enabled client-2-server service | ||
- | {5223, ejabberd_c2s, | ||
- | {max_stanza_size, | ||
- | tls, {certfile, "/ | ||
- | {shaper, c2s_shaper}]}, | ||
- | |||
- | % Server-2-server service | ||
- | {5269, ejabberd_s2s_in, | ||
- | {max_stanza_size, | ||
- | |||
- | |||
- | % HTTP service (You may choose options HTTP-polling and Web-administering) | ||
- | % When commenting out, be careful with commas | ||
- | {5280, ejabberd_http, | ||
- | ]}. | ||
- | |||
- | % Use STARTTLS+Dialback for S2S connections | ||
- | {s2s_use_starttls, | ||
- | {s2s_certfile, | ||
- | %{domain_certfile, | ||
- | %{domain_certfile, | ||
- | |||
- | % If SRV lookup fails, then port 5269 is used to communicate with remote server | ||
- | {outgoing_s2s_port, | ||
- | |||
- | % Used modules: | ||
- | {modules, | ||
- | [ | ||
- | {mod_adhoc, | ||
- | {mod_announce, | ||
- | {mod_register, | ||
- | {mod_roster, | ||
- | {mod_privacy, | ||
- | {mod_configure, | ||
- | {mod_configure2, | ||
- | {mod_disco, | ||
- | {mod_stats, | ||
- | {mod_vcard, | ||
- | % {mod_offline, | ||
- | {mod_echo, | ||
- | {mod_private, | ||
- | {mod_irc, | ||
- | {mod_muc, | ||
- | {access_create, | ||
- | {access_admin, | ||
- | % {mod_muc_log, | ||
- | % {mod_shared_roster, | ||
- | {mod_pubsub, | ||
- | {mod_time, | ||
- | {mod_last, | ||
- | {mod_version, | ||
- | ]}. | ||
- | |||
- | % vim:set ft=erlang: | ||
- | % Local Variables: | ||
- | % mode: erlang | ||
- | % End: | ||
- | |||
- | </ | ||
- | |||
- | |||
- | ===== Using Ejabberd ===== | ||
- | |||
- | - Start the server. | ||
- | - Register users. | ||
- | * We register the following users: | ||
- | - " | ||
- | - " | ||
- | - " | ||
- | - " | ||
- | * You can register users with various methods. | ||
- | - From CVS, OpenSRF/ | ||
- | |||
- | ===== Installing Ejabberd From Source ===== | ||
- | |||
- | As of Debian Etch (4.0) and Ubuntu Gutsy (7.10), Erlang and Ejabberd will install just fine via your system' | ||
- | |||
- | ==== Install Erlang ==== | ||
- | |||
- | Ejabberd is built on [[http:// | ||
- | |||
- | Get the latest source from [[http:// | ||
- | |||
- | % ./configure && make && make install | ||
- | |||
- | ==== Install Ejabberd ==== | ||
- | |||
- | Get the latest source from [[http:// | ||
- | cd into the src directory: | ||
- | |||
- | % ./configure && make | ||
- | |||
- | --------- | ||
- | Thus far, we have been running Ejabber directly from the directory where it is built. | ||
- | --------- | ||
- | |||
- | ==== Configure and Run Ejabberd ==== | ||
- | |||
- | The system needs an ejabberd user (with a real home directory) and a jabber group. | ||
- | |||
- | % groupadd jabberd \\ | ||
- | % useradd -m -G jabberd ejabberd | ||
- | |||
- | From within the src directory : | ||
- | |||
- | % cp ejabberd.cfg.example ejabberd.cfg \\ | ||
- | % chown ejabberd: | ||
- | % chmod 750 ../src -R \\ | ||
- | |||
- | Now edit ejabberd.cfg. | ||
- | - the " | ||
- | - the " | ||
- | |||
- | Now start the server. | ||
- | |||
- | % su ejabberd | ||
- | % erl -s ejabberd -name ejabberd -ejabberd config " | ||
- | |||
- | Test it | ||
- | |||
- | % telnet localhost 5222 \\ | ||
- | |||
- | If you can't connect (and this is the correctly configured port), re-run the above command without the " | ||
- | |||
- | Consult the [[http:// |