From: Badlop ejabberd is a free and open source instant messaging server written in Erlang. ejabberd is cross-platform, distributed, fault-tolerant, and based on open standards to achieve real-time communication. ejabberd is designed to be a rock-solid and feature rich XMPP server. ejabberd is suitable for small deployments, whether they need to be scalable or not, as well as extremely big deployments.
-Chapter 1 Introduction
The command to compile ejabberd in BSD systems is:
gmake ++
You need to have GNU install, +but it isn’t included in Solaris. +It can be easily installed if your Solaris system +is set up for blastwave.org +package repository. +Make sure /opt/csw/bin is in your PATH and run: +
pkg-get -i fileutils +
If that program is called ginstall, +modify the ejabberd Makefile script to suit your system, +for example: +
cat Makefile | sed s/install/ginstall/ > Makefile.gi +
And finally install ejabberd with: +
gmake -f Makefile.gi ginstall-
To compile ejabberd on a Microsoft Windows system, you need:
ejabberd\src\ejabberd.cfg
and run
werl -s ejabberd -name ejabberd
You need a Jabber account and grant him administrative privileges +
You need a Jabber account and grant him administrative privileges to enter the ejabberd Web Admin:
To upgrade an ejabberd installation to a new version, +
To upgrade an ejabberd installation to a new version, simply uninstall the old version, and then install the new one. Of course, it is important that the configuration file and Mnesia database spool directory are not removed.
ejabberd automatically updates the Mnesia table definitions at startup when needed. If you also use an external database for storage of some modules, check if the release notes of the new ejabberd version indicates you need to also update those tables.
-The configuration file will be loaded the first time you start ejabberd. The +
The configuration file will be loaded the first time you start ejabberd. The content from this file will be parsed and stored in the internal ejabberd database. Subsequently the configuration will be loaded from the database and any commands in the configuration file are appended to the entries in the database.
Note that ejabberd never edits the configuration file. @@ -477,7 +493,7 @@ override_acls.
With these lines the old global options (shared between all ejabberd nodes in a cluster), local options (which are specific for this particular ejabberd node) and ACLs will be removed before new ones are added.
-The option hosts defines a list containing one or more domains that ejabberd will serve.
Examples:
{hosts, ["example.net", "example.com"]}.
Options can be defined separately for every virtual host using the host_config option. It has the following syntax: @@ -561,7 +577,7 @@ other different modules for some specific virtual hosts: } ]}.
-The option listen defines for which addresses and ports ejabberd will listen and what services will be run on them. Each element of the list is a tuple with the following elements: @@ -835,7 +851,7 @@ services you have to make the transports log and do XDB by themselves: </xdb_file> </xdb>
-The option auth_method defines the authentication method that is used for user authentication:
{auth_method, [<method>]}. @@ -944,7 +960,7 @@ attacks.
Access control in ejabberd is performed via Access Control Lists (ACLs). The @@ -1044,7 +1060,7 @@ There’s also available the access max_s2s_connections_per_node.< Allow up to 3 connections with each remote server:
{access, max_s2s_connections, [{3, all}]}.-
Shapers enable you to limit connection traffic. The syntax of shapers is like this:
{shaper, <shapername>, <kind>}. @@ -1063,7 +1079,7 @@ To define a shaper named ‘normal’ with traffic speed limi 50,000 bytes/second:{shaper, fast, {maxrate, 50000}}.-3.1.7 Default Language
3.1.7 Default Language
The option language defines the default language of server strings that can be seen by Jabber clients. If a Jabber client do not support xml:lang, the specified language is used. The default value is @@ -1075,7 +1091,7 @@ To set Russian as default language:
{language, "es"}.
ejabberd uses its internal Mnesia database by default. However, it is possible to use a relational database or an LDAP server to store persistent, @@ -1097,7 +1113,7 @@ different storage systems for modules, and so forth.
The following databas
Although this section will describe ejabberd’s configuration when you want to use the native MySQL driver, it does not describe MySQL’s installation and database creation. Check the MySQL documentation and the tutorial Using ejabberd with MySQL native driver for information regarding these topics. @@ -1153,7 +1169,7 @@ relational databases like MySQL. To enable storage to your database, just make sure that your database is running well (see previous sections), and replace the suffix-less or ldap module variant with the odbc module variant. Keep in mind that you cannot have several variants of the same module loaded!
-Although this section will describe ejabberd’s configuration when you want to use Microsoft SQL Server, it does not describe Microsoft SQL Server’s installation and database creation. Check the MySQL documentation and the @@ -1189,7 +1205,7 @@ database, just make sure that your database is running well (see previous sections), and replace the suffix-less or ldap module variant with the odbc module variant. Keep in mind that you cannot have several variants of the same module loaded!
-Although this section will describe ejabberd’s configuration when you want to use the native PostgreSQL driver, it does not describe PostgreSQL’s installation and database creation. Check the PostgreSQL documentation and the tutorial Using ejabberd with MySQL native driver for information regarding these topics. @@ -1248,7 +1264,7 @@ relational databases like PostgreSQL. To enable storage to your database, just make sure that your database is running well (see previous sections), and replace the suffix-less or ldap module variant with the odbc module variant. Keep in mind that you cannot have several variants of the same module loaded!
-Although this section will describe ejabberd’s configuration when you want to use the ODBC driver, it does not describe the installation and database creation of your database. Check the documentation of your database. The tutorial Using ejabberd with MySQL native driver also can help you. Note that the tutorial @@ -1291,7 +1307,7 @@ database, just make sure that your database is running well (see previous sections), and replace the suffix-less or ldap module variant with the odbc module variant. Keep in mind that you cannot have several variants of the same module loaded!
-ejabberd has built-in LDAP support. You can authenticate users against LDAP server and use LDAP directory as vCard storage. Shared rosters are not supported yet.
@@ -1468,7 +1484,7 @@ configuration is shown below:{auth_method, ldap}. ... ]}.-
The option modules defines the list of modules that will be loaded after ejabberd’s startup. Each entry in the list is a tuple in which the first element is the name of a module and the second is a list of options for that @@ -1490,7 +1506,7 @@ all entries end with a comma: {mod_version, []} ]}.
-The following table lists all modules included in ejabberd.
-
Module Feature Dependencies @@ -1552,7 +1568,7 @@ Last connection date and time: Use mod_last_odbc instead of ejabberd website. Please remember that these contributions might not work or that they can contain severe bugs and security leaks. Therefore, use them at your own risk! - mod_adhoc Ad-Hoc Commands (XEP-0050) 3.3.2 Common Options
The following options are used by many modules. Therefore, they are described in +
3.3.2 Common Options
The following options are used by many modules. Therefore, they are described in this separate section.
iqdisc
Many modules define handlers for processing IQ queries of different namespaces @@ -1604,7 +1620,7 @@ the "@HOST@" keyword must be used: ... ]}.
-3.3.3 mod_announce
3.3.3 mod_announce
This module enables configured users to broadcast announcements and to set the message of the day (MOTD). Configured users can perform these actions with a @@ -1668,7 +1684,7 @@ Only administrators can send announcements:
Note that mod_announce can be resource intensive on large deployments as it can broadcast lot of messages. This module should be disabled for instances of ejabberd with hundreds of thousands users.
-3.3.4 mod_disco
3.3.4 mod_disco
@@ -1711,7 +1727,7 @@ To serve a link to the Jabber User Directory on jabber.org: ... ]}.
-3.3.5 mod_echo
3.3.5 mod_echo
This module simply echoes any Jabber packet back to the sender. This mirror can be of interest for ejabberd and Jabber client debugging.
Options: @@ -1731,7 +1747,7 @@ of them all? ... ]}. -
3.3.6 mod_http_bind
+
3.3.6 mod_http_bind
This module implements XMPP over Bosh (formerly known as HTTP Binding) as outlined by XEP-0206. @@ -1773,7 +1789,7 @@ For example: ... ]}. -
3.3.7 mod_http_fileserver
+
3.3.7 mod_http_fileserver
This simple module serves files from the local disk over HTTP.
Options:
-
- @@ -1814,7 +1830,7 @@ To use this module you must enable it: ... ]}. -
3.3.8 mod_irc
3.3.8 mod_irc
This module is an IRC transport that can be used to join channels on IRC servers.
End user information: @@ -1873,7 +1889,7 @@ our domains and on other servers. ... ]}.
-3.3.9 mod_last
3.3.9 mod_last
This module adds support for Last Activity (XEP-0012). It can be used to discover when a disconnected user last accessed the server, to know when a connected user was last active on the server, or to query the uptime of the @@ -1882,7 +1898,7 @@ connected user was last active on the server, or to query the uptime of the iqdisc
- This specifies the processing discipline for Last activity (jabber:iq:last) IQ queries (see section 3.3.2).
3.3.10 mod_muc
3.3.10 mod_muc
With this module enabled, your server will support Multi-User Chat (XEP-0045). End users will be able to join text conferences.
Some of the features of Multi-User Chat:
-
- @@ -2080,7 +2096,7 @@ newly created chatrooms have by default those options. ... ]}.
3.3.11 mod_muc_log
3.3.11 mod_muc_log
This module enables optional logging of Multi-User Chat (MUC) conversations to HTML. Once you enable this module, users can join a chatroom using a MUC capable Jabber client, and if they have enough privileges, they can request the @@ -2187,7 +2203,7 @@ top link will be the default
-<a href="/">Home</a>
. ... ]}.3.3.12 mod_offline
3.3.12 mod_offline
This module implements offline message storage. This means that all messages sent to an offline user will be stored on the server until that user comes online again. Thus it is very similar to how email works. Note that @@ -2198,7 +2214,7 @@ is use to set a max number of offline messages per user (quota). Its value can be either infinity or a strictly positive integer. The default value is infinity.
-3.3.13 mod_privacy
3.3.13 mod_privacy
This module implements Blocking Communication (also known as Privacy Rules) as defined in section 10 from XMPP IM. If end users have support for it in their Jabber client, they will be able to: @@ -2226,7 +2242,7 @@ subscription type (or globally). iqdisc
This specifies the processing discipline for Blocking Communication (jabber:iq:privacy) IQ queries (see section 3.3.2). -3.3.14 mod_private
3.3.14 mod_private
This module adds support for Private XML Storage (XEP-0049):
Using this method, Jabber entities can store private data on the server and @@ -2238,7 +2254,7 @@ of client-specific preferences; another is Bookmark Storage ( This specifies the processing discipline for Private XML Storage (jabber:iq:private) IQ queries (see section 3.3.2). -3.3.15 mod_proxy65
3.3.15 mod_proxy65
This module implements SOCKS5 Bytestreams (XEP-0065). It allows ejabberd to act as a file transfer proxy between two XMPP clients.
Options: @@ -2293,7 +2309,7 @@ The simpliest configuration of the module: ... ]}.
-3.3.16 mod_pubsub
3.3.16 mod_pubsub
This module offers a Publish-Subscribe Service (XEP-0060). The functionality in mod_pubsub can be extended using plugins. The plugin that implements PEP (Personal Eventing via Pubsub) (XEP-0163) @@ -2324,7 +2340,7 @@ and is shared by all node plugins. ... ]}.
-3.3.17 mod_register
3.3.17 mod_register
This module adds support for In-Band Registration (XEP-0077). This protocol enables end users to use a Jabber client to:
-
- @@ -2396,13 +2412,13 @@ Also define a registration timeout of one hour: ... ]}.
3.3.18 mod_roster
3.3.18 mod_roster
This module implements roster management as defined in RFC 3921: XMPP IM.
Options:
-
- iqdisc
- This specifies the processing discipline for Roster Management (jabber:iq:roster) IQ queries (see section 3.3.2).
3.3.19 mod_service_log
3.3.19 mod_service_log
This module adds support for logging end user packets via a Jabber message auditing service such as Bandersnatch. All user @@ -2432,7 +2448,7 @@ To log all end user packets to the Bandersnatch service running on ... ]}.
-3.3.20 mod_shared_roster
3.3.20 mod_shared_roster
This module enables you to create shared roster groups. This means that you can create groups of people that can see members from (other) groups in their rosters. The big advantages of this feature are that end users do not need to @@ -2507,7 +2523,7 @@ roster groups as shown in the following table:
This module adds support for Statistics Gathering (XEP-0039). This protocol allows you to retrieve next statistics from your ejabberd deployment:
This module features support for Entity Time (XEP-0090). By using this XEP, you are able to discover the time at another entity’s location.
Options:
This module allows end users to store and retrieve their vCard, and to retrieve other users vCards, as defined in vcard-temp (XEP-0054). The module also implements an uncomplicated Jabber User Directory based on the vCards of @@ -2601,7 +2617,7 @@ and that all virtual hosts will be searched instead of only the current one: ... ]}.
-ejabberd can map LDAP attributes to vCard fields. This behaviour is implemented in the mod_vcard_ldap module. This module does not depend on the authentication method (see 3.2.5).
The mod_vcard_ldap module has @@ -2775,7 +2791,7 @@ searching his info in LDAP.
This module implements Software Version (XEP-0092). Consequently, it answers ejabberd’s version when queried.
Options:
The ejabberdctl command line administration script allows to start, stop and perform +
The ejabberdctl command line administration script allows to start, stop and perform many other administrative tasks in a local or remote ejabberd server.
When ejabberdctl is executed without any parameter, it displays the available options. If there isn’t an ejabberd server running, the available parameters are: @@ -2819,7 +2835,7 @@ and other codes may be used for specifical results. This can be used by other scripts to determine automatically if a command succedded or failed, for example using: echo $?
-ejabberd is an Erlang/OTP application that runs inside an Erlang runtime system. +
ejabberd is an Erlang/OTP application that runs inside an Erlang runtime system. This system is configured using environment variables and command line parameters. The ejabberdctl administration script uses many of those possibilities. You can configure some of them with the file ejabberdctl.cfg, @@ -2882,7 +2898,7 @@ Starts the Erlang system detached from the system console.
Note that some characters need to be escaped when used in shell scripts, for instance "
and {}
.
You can find other options in the Erlang manual page (erl -man erl).
The ejabberd Web Admin allows to administer most of ejabberd using a web browser.
This feature is enabled by default:
a ejabberd_http listener with the option web_admin (see
section 3.1.3) is included in the listening ports. Then you can open
@@ -2942,13 +2958,13 @@ web browser to https://192.168.1.1:5280/admin/
:
...
]}.
If you enable mod_configure and mod_adhoc, +
If you enable mod_configure and mod_adhoc, you can perform several administrative tasks in ejabberd with a Jabber client. The client must support Ad-Hoc Commands (XEP-0050), and you must login in the Jabber server with an account with proper privileges.
-ejabberd uses the distributed Mnesia database. +
ejabberd uses the distributed Mnesia database. Being distributed, Mnesia enforces consistency of its file, so it stores the name of the Erlang node in it. The name of an Erlang node includes the hostname of the computer. @@ -2964,8 +2980,8 @@ you must follow these instructions: For example:
ejabberdctl restore /tmp/ejabberd-oldhost.backup-
You need to take the following TCP ports in mind when configuring your firewall:
-
@@ -2976,7 +2992,7 @@ you must follow these instructions: Port Description port range Used for connections between Erlang nodes. This range is configurable.
epmd (Erlang Port Mapper Daemon) +
epmd (Erlang Port Mapper Daemon) is a small name server included in Erlang/OTP and used by Erlang programs when establishing distributed Erlang communications. ejabberd needs epmd to use ejabberdctl and also when clustering ejabberd nodes. @@ -3000,7 +3016,7 @@ The ports used in this case are random. You can limit the range of ports when starting Erlang with a command-line parameter, for example:
erl ... -kernel inet_dist_listen_min 4370 inet_dist_listen_max 4375-
The Erlang cookie is a string with numbers and letters. +
The Erlang cookie is a string with numbers and letters. An Erlang node reads the cookie at startup from the command-line parameter -setcookie or from a cookie file. Two Erlang nodes communicate only if they have the same cookie. @@ -3013,7 +3029,7 @@ to prevent unauthorized access or intrusion to an Erlang node. The communication between Erlang nodes are not encrypted, so the cookie could be read sniffing the traffic on the network. The recommended way to secure the Erlang node is to block the port 4369.
-An Erlang node may have a node name. +
An Erlang node may have a node name. The name can be short (if indicated with the command-line parameter -sname) or long (if indicated with the parameter -name). Starting an Erlang node with -sname limits the communication between Erlang nodes to the LAN.
Using the option -sname instead of -name is a simple method @@ -3022,9 +3038,9 @@ However, it is not ultimately effective to prevent access to the Erlang node, because it may be possible to fake the fact that you are on another network using a modified version of Erlang epmd. The recommended way to secure the Erlang node is to block the port 4369.
-A Jabber domain is served by one or more ejabberd nodes. These nodes can be run on different machines that are connected via a network. They all must have the ability to connect to port 4369 of all another nodes, and must @@ -3038,29 +3054,29 @@ router,
This module is the main router of Jabber packets on each node. It routes them based on their destination’s domains. It uses a global routing table. The domain of the packet’s destination is searched in the routing table, and if it is found, the packet is routed to the appropriate process. If not, it is sent to the s2s manager.
-This module routes packets which have a destination domain equal to one of this server’s host names. If the destination JID has a non-empty user part, it is routed to the session manager, otherwise it is processed depending on its content.
-This module routes packets to local users. It looks up to which user resource a packet must be sent via a presence table. Then the packet is either routed to the appropriate c2s process, or stored in offline storage, or bounced back.
-This module routes packets to other Jabber servers. First, it checks if an opened s2s connection from the domain of the packet’s source to the domain of the packet’s destination exists. If that is the case, the s2s manager routes the packet to the process serving this connection, otherwise a new connection is opened.
-Suppose you already configured ejabberd on one machine named (first), and you need to setup another one to make an ejabberd cluster. Then do following steps:
access
’ options — they will be taken from
enabled only on one machine in the cluster).
You can repeat these steps for other machines supposed to serve this domain.
-ejabberd includes an algorithm to load balance the components that are plugged on an ejabberd cluster. It means that you can plug one or several instances of the same component on each ejabberd cluster and that the traffic will be automatically distributed.
The default distribution algorithm try to deliver to a local instance of a component. If several local instances are available, one instance is chosen randomly. If no instance is available locally, one instance is chosen randomly among the remote component instances.
If you need a different behaviour, you can change the load balancing behaviour with the option domain_balancing. The syntax of the option is the following:
{domain_balancing, "component.example.com", <balancing_criterium>}.
Several balancing criteria are available:
When there is a risk of failure for a given component, domain balancing can cause service trouble. If one component is failing the service will not work correctly unless the sessions are rebalanced.
In this case, it is best to limit the problem to the sessions handled by the failing component. This is what the domain_balancing_component_number option does, making the load balancing algorithm not dynamic, but sticky on a fix number of component instances.
The syntax is the following:
{domain_balancing_component_number, "component.example.com", N}-
ejabberd includes a watchdog mechanism. If a process in the ejabberd server consumes too much memory, a message is sent to the Jabber accounts defined with the option @@ -3124,7 +3140,7 @@ Example configuration: To remove all watchdog admins, set the option with an empty list:
{watchdog_admins, []}.-
An ejabberd node writes two log files: +
An ejabberd node writes two log files:
{loglevel, 4}.-
The Debug Console is an Erlang shell attached to an already running ejabberd server. +
The Debug Console is an Erlang shell attached to an already running ejabberd server. With this Erlang shell, an experienced administrator can perform complex tasks.
This shell gives complete control over the ejabberd server, so it is important to use it with extremely care. There are some simple and safe examples in the article Interconnecting Erlang Nodes
To exit the shell, close the window or press the keys: control+c control+c.
-All built-in modules support the xml:lang attribute inside IQ queries. Figure A.1, for example, shows the reply to the following query:
<iq id='5' @@ -3173,9 +3189,9 @@ HTTP header ‘Accept-Language: ru’-Appendix B Release Notes
Appendix B Release Notes
Release notes are available from ejabberd Home Page
-Appendix C Acknowledgements
Thanks to all people who contributed to this guide: +
Appendix C Acknowledgements
Thanks to all people who contributed to this guide:
Ejabberd Installation and Operation Guide.
+
Ejabberd Installation and Operation Guide.
Copyright © 2003 — 2008 Process-one
This document is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 diff --git a/doc/guide.tex b/doc/guide.tex index cb8e9dc6e..d08fddbce 100644 --- a/doc/guide.tex +++ b/doc/guide.tex @@ -405,6 +405,31 @@ gmake \end{verbatim} +\makesubsection{solaris}{Specific Notes for Sun Solaris} +\ind{install!solaris} + +You need to have \term{GNU install}, +but it isn't included in Solaris. +It can be easily installed if your Solaris system +is set up for \footahref{http://www.blastwave.org/}{blastwave.org} +package repository. +Make sure \term{/opt/csw/bin} is in your \term{PATH} and run: +\begin{verbatim} +pkg-get -i fileutils +\end{verbatim} + +If that program is called \term{ginstall}, +modify the \ejabberd{} \term{Makefile} script to suit your system, +for example: +\begin{verbatim} +cat Makefile | sed s/install/ginstall/ > Makefile.gi +\end{verbatim} +And finally install \ejabberd{} with: +\begin{verbatim} +gmake -f Makefile.gi ginstall +\end{verbatim} + + \makesubsection{windows}{Specific Notes for Microsoft Windows} \ind{install!windows}