From: Badlop Probably the easiest way to install an ejabberd instant messaging server
-is using the binary installer published by ProcessOne.
-The binary installers of released ejabberd versions
+is using the binary installer published by ProcessOne.
+The binary installers of released ejabberd versions
are available in the ProcessOne ejabberd downloads page:
http://www.process-one.net/en/ejabberd/downloads The installer will deploy and configure a full featured ejabberd
server and does not require any extra dependencies. In *nix systems, remember to set executable the binary installer before starting it. For example:
@@ -282,13 +282,13 @@ server and does not require any extra dependencies. In *nix systems, remem
ejabberd can be started manually at any time,
or automatically by the operating system at system boot time. To start and stop ejabberd manually,
use the desktop shortcuts created by the installer.
-If the machine doesn’t have a graphical system, use the scripts ’start’
+If the machine doesn’t have a graphical system, use the scripts ’start’
and ’stop’ in the ’bin’ directory where ejabberd is installed. The Windows installer also adds ejabberd as a system service,
and a shortcut to a debug console for experienced administrators.
-If you want ejabberd to be started automatically at boot time,
+If you want ejabberd to be started automatically at boot time,
go to the Windows service settings and set ejabberd to be automatically started.
-Note that the Windows service is a feature still in development,
-and for example it doesn’t read the file ejabberdctl.cfg. On a *nix system, if you want ejabberd to be started as daemon at boot time,
+Note that the Windows service is a feature still in development,
+and for example it doesn’t read the file ejabberdctl.cfg. On a *nix system, if you want ejabberd to be started as daemon at boot time,
copy ejabberd.init from the ’bin’ directory to something like /etc/init.d/ejabberd
(depending on your distribution) and call /etc/inid.d/ejabberd start to start it. If ejabberd doesn’t start correctly in Windows,
try to start it using the shortcut in desktop or start menu.
@@ -305,9 +305,9 @@ This way you see the error message provided by Erlang
and can identify what is exactly the problem. The ejabberdctl administration script is included in the bin directory.
Please refer to the section 4.1 for details about ejabberdctl,
and configurable options to fine tune the Erlang runtime system. Some Operating Systems provide a specific ejabberd package adapted to
+ Some Operating Systems provide a specific ejabberd package adapted to
the system architecture and libraries.
-It usually also checks dependencies
+It usually also checks dependencies
and performs basic configuration tasks like creating the initial
administrator account. Some examples are Debian and Gentoo. Consult the
resources provided by your Operating System for more information. Usually those packages create a script like /etc/init.d/ejabberd
@@ -317,12 +317,12 @@ to start and stop ejabberd as a service at boot time. The canonical form for distribution of ejabberd stable releases is the source code package.
-Compiling ejabberd from source code is quite easy in *nix systems,
+Compiling ejabberd from source code is quite easy in *nix systems,
as long as your system have all the dependencies. To compile ejabberd on a ‘Unix-like’ operating system, you need:
@@ -350,10 +350,10 @@ To get the full list run the command:
Some options that you may be interested in modifying:
To install ejabberd in the destination directories, run the command:
@@ -432,8 +432,8 @@ and configurable options to fine tune the Erlang runtime system. 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.
+is set up for blastwave.org
+package repository.
Make sure /opt/csw/bin is in your PATH and run:
If that program is called ginstall,
@@ -471,8 +471,8 @@ directory, you can add the directories
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,
simply uninstall the old version, and then install the new one.
-Of course, it is important that the configuration file
+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
@@ -514,7 +514,7 @@ indicates you need to also update those tables. 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.
+configuration file are appended to the entries in the database. Note that ejabberd never edits the configuration file.
So, the configuration changes done using the Web Admin
are stored in the database, but are not reflected in the configuration file.
If you want those changes to be use after ejabberd restart, you can either
@@ -625,7 +625,7 @@ Port number.
The available modules, their purpose and the options allowed by each one are:
Remember that you must also instal
Chapter 2 Installing ejabberd
2.1 Installing ejabberd with Binary Installer
2.2 Installing ejabberd with Operating System specific packages
2.2 Installing ejabberd with Operating System specific packages
2.4 Installing ejabberd from Source Code
2.4.1 Requirements
./configure --help
2.4.4 Install
pkg-get -i fileutils
C:\sdk\GnuWin32\bin
to the PATH
environment
variable.
C:\sdk\OpenSSL
and add C:\sdk\OpenSSL\lib\VC
to your path or copy the binaries to your system directory.
-C:\sdk\gnuWin32
. Copy
-C:\sdk\GnuWin32\bin\zlib1.dll
to your system directory. If you change your path it should already be set after libiconv install.
+C:\sdk\gnuWin32
. Copy
+C:\sdk\GnuWin32\bin\zlib1.dll
to your system directory. If you change your path it should already be set after libiconv install.
set PATH=%PATH%;"C:\sdk\erl5.5.5\bin"
ejabberd\src
run:
@@ -484,7 +484,7 @@ nmake -f Makefile.win32
2.5 Create a Jabber Account for Administration
2.6 Upgrading ejabberd
3.1 Basic Configuration
Options: access, certfile, inet6,
ip, max_stanza_size, shaper,
@@ -635,7 +635,7 @@ Handles c2s connections.
Handles incoming s2s connections.
Options: inet6, ip, max_stanza_size
Options: access, hosts, inet6,
ip, shaper, service_check_from
@@ -670,7 +670,7 @@ do not allow outgoing sockets on port 5222.http://server:port/http-bind/
. Be aware that support for HTTP Bind
is also needed in the Jabber client. Remark also that HTTP Bind can be
interesting to host a web-based Jabber client such as
-JWChat
+JWChat
(check the tutorials to install JWChat with ejabberd and an
embedded local web server
or Apache).
@@ -684,7 +684,7 @@ interesting to host a web-based Jabber client such as
JWChat.
{ip, {192, 168, 1, 1}}
.
@@ -716,7 +716,7 @@ You should also set the certfile option.
You can define a certificate file for a specific domain using the global option domain_certfile.
{maxrate, <rate>}
where <rate> stands for the maximum allowed incoming rate in bytes per second. -When a connection exceeds this limit, ejabberd stops reading from the socket +When a connection exceeds this limit, ejabberd stops reading from the socket until the average rate is again below the allowed maximum.
Examples:
{include_config_file, "./example.org/additional_not_listen.cfg", [{disallow, [listen]}]}. -
In this example, ejabberd.cfg defines some ACL and Access rules, +
In this example, ejabberd.cfg defines some ACL and Access rules, and later includes another file with additional rules:
{acl, admin, {user, "admin", "localhost"}}. {access, announce, [{allow, admin}]}. @@ -1257,11 +1257,14 @@ you. This file contains the ejabberd schema for MySQL. At the end of th you can find information to update your database schema.By default ejabberd opens 10 connections to the database for each virtual host. Use this option to modify the value:
{odbc_pool_size, 10}. -You can configure an interval to make a dummy SQL request -to keep alive the connections to the database. -The default value is ’undefined’, so no keepalive requests are made. +
You can configure an interval to make a dummy SQL request +to keep alive the connections to the database. +The default value is ’undefined’, so no keepalive requests are made. Specify in seconds: for example 28800 means 8 hours.
{odbc_keepalive_interval, undefined}. +
If the connection to the database fails, ejabberd waits 30 seconds before retrying. +You can modify this interval with this option: +
{odbc_start_interval, 30}.
You can skip this step if you installed ejabberd using a binary installer or @@ -1314,9 +1317,9 @@ you. This file contains the ejabberd schema for Microsoft SQL Server. A of the file you can find information to update your database schema.
By default ejabberd opens 10 connections to the database for each virtual host. Use this option to modify the value:
{odbc_pool_size, 10}. -
You can configure an interval to make a dummy SQL request -to keep alive the connections to the database. -The default value is ’undefined’, so no keepalive requests are made. +
You can configure an interval to make a dummy SQL request +to keep alive the connections to the database. +The default value is ’undefined’, so no keepalive requests are made. Specify in seconds: for example 28800 means 8 hours.
{odbc_keepalive_interval, undefined}.@@ -1349,9 +1352,9 @@ This file contains the ejabberd schema for PostgreSQL. At the end of th you can find information to update your database schema.
By default ejabberd opens 10 connections to the database for each virtual host. Use this option to modify the value:
{odbc_pool_size, 10}. -
You can configure an interval to make a dummy SQL request -to keep alive the connections to the database. -The default value is ’undefined’, so no keepalive requests are made. +
You can configure an interval to make a dummy SQL request +to keep alive the connections to the database. +The default value is ’undefined’, so no keepalive requests are made. Specify in seconds: for example 28800 means 8 hours.
{odbc_keepalive_interval, undefined}.@@ -1360,7 +1363,7 @@ Specify in seconds: for example 28800 means 8 hours. if the binary packages of ejabberd you are using include support for PostgreSQL.
By default ejabberd opens 10 connections to the database for each virtual host. Use this option to modify the value:
{odbc_pool_size, 10}. -
You can configure an interval to make a dummy SQL request -to keep alive the connections to the database. -The default value is ’undefined’, so no keepalive requests are made. +
You can configure an interval to make a dummy SQL request +to keep alive the connections to the database. +The default value is ’undefined’, so no keepalive requests are made. Specify in seconds: for example 28800 means 8 hours.
{odbc_keepalive_interval, undefined}.@@ -1445,17 +1448,17 @@ 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.
Note that ejabberd treats LDAP as a read-only storage: -it is possible to consult data, but not possible to +it is possible to consult data, but not possible to create accounts, change password or edit vCard that is stored in LDAP.
Parameters:
This option defines the Jabber ID of a service provided by an ejabberd module. The keyword "@HOST@" is replaced at start time with the real virtual host string.
This example configures -the echo module to provide its echoing service +the echo module to provide its echoing service in the Jabber ID mirror.example.org:
{modules, [ @@ -1758,7 +1761,7 @@ the "@HOST@" keyword must be used:
This module enables configured users to broadcast announcements and to set -the message of the day (MOTD). +the message of the day (MOTD). Configured users can perform these actions with a Jabber client either using Ad-hoc commands or sending messages to specific JIDs.
The Ad-hoc commands are listed in the Server Discovery.
@@ -1832,7 +1835,7 @@ for the superseded Jabber Browsing (
Options:
@@ -1963,7 +1966,7 @@ Sending public and private messages to room occupants.
The MUC service allows any Jabber ID to register a nickname, so nobody else can use that nickname in any room in the MUC service. -To register a nickname, open the Service Discovery in your +To register a nickname, open the Service Discovery in your Jabber client and register in the MUC service.
This module supports clustering and load balancing. One module can be started per cluster node. Rooms are distributed at creation time on all available MUC module @@ -2042,7 +2045,7 @@ interval delay. Intermediate presence packets are silently discarded. A good value for this option is 4 seconds.
Options:
@@ -2325,7 +2328,7 @@ it is valid XML. One typical usage for this namespace is the server-side storage of client-specific preferences; another is Bookmark Storage (XEP-0048).
Options:
@@ -2402,7 +2405,7 @@ ACL and ACCESS. The default value is pubsub_createnode.
Example:
{modules, [ @@ -2428,12 +2431,12 @@ rules to restrict registration. If a rule returns ‘deny’ on the re user name, registration for that user name is denied. (there are no restrictions by default).
\n
-This module reads also another option defined globably for the server: {registration_timeout, Timeout}. @@ -2490,7 +2493,7 @@ Also define a registration timeout of one hour:
This module implements roster management as defined in RFC 3921: XMPP IM.
Options:
@@ -2513,7 +2516,7 @@ To log all end user packets to the Bandersnatch service running on ... ]}.
{modules, [ @@ -2528,9 +2531,9 @@ To log all end user packets to the Bandersnatch service running on 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 manually add all users to their rosters, and that they cannot permanently delete -users from the shared roster groups. +users from the shared roster groups. A shared roster group can have members from any Jabber server, -but the presence will only be available from and to members +but the presence will only be available from and to members of the same virtual host where the group is created.Shared roster groups can be edited only via the Web Admin. Each group has a unique identification and the following parameters:
Options:
As there are only a small amount of clients (for example Tkabber) and software libraries with @@ -2634,7 +2637,7 @@ by sending:
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:
@@ -2649,7 +2652,7 @@ service. If the host option is not specified, the Jabber ID will be the hostname of the virtual host with the prefix ‘vjud.’. The keyword "@HOST@" is replaced at start time with the real virtual host name. -
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).
Note that ejabberd treats LDAP as a read-only storage: -it is possible to consult data, but not possible to +it is possible to consult data, but not possible to create accounts, change password or edit vCard that is stored in LDAP.
The mod_vcard_ldap module has its own optional parameters. The first group of parameters has the same meaning as the top-level LDAP parameters to set the authentication method: @@ -2712,7 +2715,7 @@ service. If the host option is not specified, the Jabber ID will be the hostname of the virtual host with the prefix ‘vjud.’. The keyword "@HOST@" is replaced at start time with the real virtual host name. -
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, +it displays the available options. If there isn’t an ejabberd server running, the available parameters are:
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, +You can configure some of them with the file ejabberdctl.cfg, which includes detailed description about them. -This section describes for reference purposes +This section describes for reference purposes all the environment variables and command line parameters.
The environment variables:
The command line parameters:
Note that some characters need to be escaped when used in shell scripts, for instance "
and {}
.
@@ -2982,7 +2985,7 @@ 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
+section 3.1.3) is included in the listening ports. Then you can open
http://server:port/admin/
in your favourite web browser. You
will be asked to enter the username (the full Jabber ID) and password
of an ejabberd user with administrator rights. After authentication
@@ -3045,7 +3048,7 @@ 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 (see section 5.4). The name of an Erlang node includes the hostname of the computer. @@ -3055,7 +3058,7 @@ or when you move ejabberd to a different machine.
So, if you want you must follow these instructions:
ejabberdctl backup /tmp/ejabberd-oldhost.backup
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. +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. This small program is automatically started by Erlang, and is never stopped. -If ejabberd is stopped, and there aren’t any other Erlang programs -running in the system, you can safely stop epmd if you want.
ejabberd runs inside an Erlang node. -To communicate with ejabberd, the script ejabberdctl starts a new Erlang node +If ejabberd is stopped, and there aren’t any other Erlang programs +running in the system, you can safely stop epmd if you want.
ejabberd runs inside an Erlang node. +To communicate with ejabberd, the script ejabberdctl starts a new Erlang node and connects to the Erlang node that holds ejabberd. In order for this communication to work, epmd must be running and listening for name requests in the port 4369. @@ -3093,32 +3096,32 @@ So, if you plan to build a cluster of ejabberd nodes you must open the port 4369 for the machines involved in the cluster. Remember to block the port so Internet doesn’t have access to it.
Once an Erlang node solved the node name of another Erlang node using EPMD and port 4369, the nodes communicate directly. -The ports used in this case by default are random, +The ports used in this case by default are random, but can be configured in the file ejabberdctl.cfg. The Erlang command-line parameter used internally is, 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. If not indicated, the cookie is read from the cookie file $HOME/.erlang.cookie. If this file does not exist, it is created immediately with a random cookie. Two Erlang nodes communicate only if they have the same cookie. -Setting a cookie on the Erlang node allows you to structure your Erlang network +Setting a cookie on the Erlang node allows you to structure your Erlang network and define which nodes are allowed to connect to which.
Thanks to Erlang cookies, you can prevent access to the Erlang node by mistake, for example when there are several Erlang nodes running different programs in the same machine.
Setting a secret cookie is a simple method to difficult unauthorized access to your Erlang node. -However, the cookie system is not ultimately effective +However, the cookie system is not ultimately effective 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. -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 +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 to difficult unauthorized access to your Erlang node. 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 +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.
ejabberd stores sensible data in the file system either in plain text or binary files. @@ -3221,7 +3224,7 @@ 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>}. +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:
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 +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.
The source code of ejabberd supports localization. -The translators can edit the -gettext .po files +The translators can edit the +gettext .po files using any capable program (KBabel, Lokalize, Poedit...) or a simple text editor.
Then gettext is used to extract, update and export those .po files to the .msg format read by ejabberd. To perform those management tasks, in the src/ directory execute make translations. @@ -3299,7 +3302,7 @@ Figure A.1, for example, shows the reply to the -