diff --git a/ChangeLog b/ChangeLog index 9bcf1c5ac..485d85149 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,20 @@ 2008-01-15 Badlop + * doc/guide.tex: Improved the documentation of Binary + installer. Updated the requirements, specifically: Erlang R10B-9 + is required as minimum, and R12 is not yet supported. Added + section Upgrading ejabberd. Improved documentation about Erlang + runtime system environment variables and command-line parameters. + * doc/guide.html: Likewise + + * doc/release_notes_2.0.0.txt: Updated to RC1 + * doc/version.tex: Likewise + * src/ejabberd.hrl: Likewise + + * doc/introduction.tex: Updated to 22 languages + + * doc/Makefile: Ensure that Bash is used + * doc/guide.tex: Updated copyright dates to 2008. * src/*: Likewise diff --git a/doc/Makefile b/doc/Makefile index c5344ab5c..439a616dd 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,5 +1,7 @@ # $Id$ +SHELL = /bin/bash + CONTRIBUTED_MODULES = "" ifeq ($(shell ls mod_http_bind.tex),mod_http_bind.tex) CONTRIBUTED_MODULES += "\\r\\n\\setboolean{modhttpbind}{true}" diff --git a/doc/guide.html b/doc/guide.html index d8e901237..bce41c1d9 100644 --- a/doc/guide.html +++ b/doc/guide.html @@ -6,7 +6,7 @@ - ejabberd 2.0.0-beta1 + ejabberd 2.0.0-rc1 Installation and Operation Guide @@ -83,7 +83,7 @@ SPAN{width:20%; float:right; text-align:left; margin-left:auto;}


- +
ejabberd 2.0.0-beta1
ejabberd 2.0.0-rc1
 
Installation and Operation Guide

@@ -117,15 +117,15 @@ SPAN{width:20%; float:right; text-align:left; margin-left:auto;} 1.1  Key Features
  • 1.2  Additional Features
  • -
  • Chapter 2  Installing ejabberd +
  • Chapter 2  Installing ejabberd -
  • Chapter 3  Configuring ejabberd +
  • Chapter 3  Configuring ejabberd -
  • Chapter 4  Managing an ejabberd server +
  • Chapter 4  Managing an ejabberd server -
  • Chapter 5  Securing ejabberd +
  • Chapter 5  Securing ejabberd -
  • Chapter 6  Clustering +
  • Chapter 6  Clustering -
  • Chapter 7  Debugging +
  • Chapter 7  Debugging -
  • Appendix A  Internationalization and Localization -
  • Appendix B  Release Notes -
  • Appendix C  Acknowledgements -
  • Appendix D  Copyright Information +
  • Appendix A  Internationalization and Localization +
  • Appendix B  Release Notes +
  • Appendix C  Acknowledgements +
  • Appendix D  Copyright Information
  • Chapter 1  Introduction

    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.

    @@ -236,13 +237,13 @@ SPAN{width:20%; float:right; text-align:left; margin-left:auto;} Cross-platform: ejabberd runs under Microsoft Windows and Unix derived systems such as Linux, FreeBSD and NetBSD.
  • Distributed: You can run ejabberd on a cluster of machines and all of them will serve the same Jabber domain(s). When you need more capacity you can simply add a new cheap node to your cluster. Accordingly, you do not need to buy an expensive high-end machine to support tens of thousands concurrent users.
  • Fault-tolerant: You can deploy an ejabberd cluster so that all the information required for a properly working service will be replicated permanently on all nodes. This means that if one of the nodes crashes, the others will continue working without disruption. In addition, nodes also can be added or replaced ‘on the fly’.
  • Administrator Friendly: ejabberd is built on top of the Open Source Erlang. As a result you do not need to install an external database, an external web server, amongst others because everything is already included, and ready to run out of the box. Other administrator benefits include:
  • Internationalized: ejabberd leads in internationalization. Hence it is very well suited in a globalized world. Related features are:
  • Open Standards: ejabberd is the first Open Source Jabber server claiming to fully comply to the XMPP standard. -

    Chapter 2  Installing ejabberd

    -

    2.1  Installing ejabberd with Graphical Installer

    The easiest approach to install an ejabberd Instant Messaging server -is to use the graphical installer. The installer is available in -ejabberd Process-one -downloads page.

    The installer will deploy and configure a full featured ejabberd -server and does not require any extra dependencies.

    The installer must be set executable and started. Example: -

      wget http://www.process-one.net/downloads/ejabberd/1.1.4/ejabberd-1.1.4_2-linux-x86-installer.bin
    -  chmod +x ejabberd-1.1.4_2-linux-x86-installer.bin
    -  ./ejabberd-1.1.4_2-linux-x86-installer.bin
    -
    -

    2.2  Installing ejabberd with Operating System specific packages

    Some Operating Systems provide a specific ejabberd package adapted to -your system architecture and libraries, which also checks dependencies +

  • +

    Chapter 2  Installing ejabberd

    +

    2.1  Installing ejabberd with Binary Installer

    Probably the easiest way to install an ejabberd instant messaging server +is using the binary installer published by Process-one. +The binary installers of released ejabberd versions +are available in the Process-one 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: +

      chmod +x ejabberd-2.0.0_1-linux-x86-installer.bin
    +  ./ejabberd-2.0.0_1-linux-x86-installer.bin
    +

    The installer generates desktop shortcuts to start and stop ejabberd.

    The Windows installer also adds ejabberd as a system service, +and a shortcut to a debug console for experienced administrators. +You can start ejabberd using the shortcut or the Windows service. +If you want ejabberd to be started automatically at boot time, +go to service settings and set ejabberd to be automatic started.

    On a Linux system, if you want ejabberd to start 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.

    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.

    +

    2.2  Installing ejabberd with Operating System specific packages

    Some Operating Systems provide a specific ejabberd package adapted to +the system architecture and libraries. +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.

    -

    2.3  Installing ejabberd with CEAN

    CEAN +resources provided by your Operating System for more information.

    Usually those packages create a script like /etc/init.d/ejabberd +to start and stop ejabberd as a service at boot time.

    +

    2.3  Installing ejabberd with CEAN

    CEAN (Comprehensive Erlang Archive Network) is a repository that hosts binary -packages from many Erlang programs, including ejabberd and all its dependencies. +packages from many Erlang programs, including ejabberd and all its dependencies. The binaries are available for many different system architectures, so this is an -alternative to the binary installer and Operating System’s ejabberd packages.

    -

    2.4  Installing ejabberd from Source Code

    +alternative to the binary installer and Operating System’s ejabberd packages.

    You will have to create your own ejabberd start +script depending of how you handle your CEAN installation. +The default ejabberdctl script is located +into ejabberd’s priv directory and can be used as an example.

    +

    2.4  Installing ejabberd from Source Code

    -

    +

    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, +as long as your system have all the dependencies.

    2.4.1  Requirements

    To compile ejabberd on a ‘Unix-like’ operating system, you need:

    -

    2.4.2  Download Source Sode

    +

  • Libexpat 1.95 or higher +
  • Erlang/OTP R10B-9 up to R11B-5. Erlang R12 releases are not yet officially supported, and are not recommended for production servers. +
  • OpenSSL 0.9.6 or higher, for STARTTLS, SASL and SSL encryption. Optional, highly recommended. +
  • Zlib 1.2.3 or higher, for Stream Compression support (XEP-0138). Optional. +
  • GNU Iconv 1.8 or higher, for the IRC Transport (mod_irc). Optional. Not needed on systems with GNU Libc. +
  • +

    2.4.2  Download Source Code

    -

    Released versions of ejabberd can be obtained from
    +

    Released versions of ejabberd are available in the Process-one ejabberd downloads page: http://www.process-one.net/en/ejabberd/downloads

    -The latest development version can be retrieved from the Subversion repository using this command: +Alternatively, the latest development version can be retrieved from the Subversion repository using this command:

      svn co http://svn.process-one.net/ejabberd/trunk ejabberd
     

    2.4.3  Compile

    @@ -336,8 +352,7 @@ The latest development version can be retrieved from the Subversion repository u

    To compile ejabberd execute the commands:

      ./configure
       make
    -

    The compilation process may report several warnings related to unusued variables. -This is common, and is not a problem.

    The build configuration script provides several parameters. +

    The build configuration script provides several parameters. To get the full list run the command:

      ./configure --help
     

    Some options that you may be interested in modifying: @@ -354,15 +369,15 @@ To get the full list run the command:

    2.4.4  Install

    -

    To install ejabberd in the destination directories, run the command: +

    To install ejabberd in the destination directories, run the command:

      make install
     

    Note that you may need to have administrative privileges in the system.

    The files and directories created are, by default:

    /etc/ejabberd/
    Configuration files:
    ejabberd.cfg
    ejabberd configuration file -
    ejabberd.inetrc
    Network DNS configuration
    ejabberdctl.cfg
    Configuration file of the administration script +
    inetrc
    Network DNS configuration
    /sbin/ejabberdctl
    Administration script
    /var/lib/ejabberd/
    @@ -376,7 +391,7 @@ To get the full list run the command:
    msgs
    Translated strings (*.msgs)
    -
    /var/log/ejabberd/
    Log files (see section 7.2: +
    /var/log/ejabberd/
    Log files (see section 7.2):
    ejabberd.log
    Messages reported by ejabberd code
    sasl.log
    Messages reported by Erlang/OTP @@ -384,10 +399,7 @@ To get the full list run the command:

    2.4.5  Start

    -

    You can use the ejabberdctl command line administration script to start and stop ejabberd. -This script is located into tools directory of sources archive. If you installed ejabberd from sources, -ejabberdctl is located into destination sbin directory (default /usr/local/sbin). If you installed -ejabberd with the installer, ejabberdctl is located into ejabberd’s bin directory.

    Usage example: +

    You can use the ejabberdctl command line administration script to start and stop ejabberd.

    Usage example:

    $ ejabberdctl start
     
     $ ejabberdctl status
    @@ -396,13 +408,10 @@ ejabberd is running
     
     $ ejabberdctl stop
     

    Please refer to the section 4.1 for details about ejabberdctl, -and configurable options to fine tune the Erlang runtime system.

    Note: if you installed ejabberd with your distribution packaging system, ejabberdctl should be called -by an /etc/init.d/ejabberd script to allow you to start and stop ejabberd as a service at boot time.

    If you installed ejabberd using CEAN package, you will have to create your own ejabberd start -script depending of how you handle your CEAN installation. The default ejabberdctl script is located -into ejabberd’s priv directory and can be used as an example.

    +and configurable options to fine tune the Erlang runtime system.

    2.4.6  Specific Notes for BSD

    -

    The command to compile ejabberd in BSD systems is: +

    The command to compile ejabberd in BSD systems is:

      gmake
     

    2.4.7  Specific Notes for Microsoft Windows

    @@ -421,7 +430,7 @@ MS Visual C++ 6.0 Compiler

  • Zlib 1.2.3 or higher
  • Compilation

    -

    We assume that we will try to put as much library as possible into C:\sdk\ to make it easier to track what is install for ejabberd.

    1. +

      We assume that we will try to put as much library as possible into C:\sdk\ to make it easier to track what is install for ejabberd.

      1. Install Erlang emulator (for example, into C:\sdk\erl5.5.5).
      2. Install Expat library into C:\sdk\Expat-2.0.0 directory.

        Copy file C:\sdk\Expat-2.0.0\Libs\libexpat.dll @@ -448,7 +457,7 @@ nmake -f Makefile.win32

      2.5  Create a Jabber Account for Administration

      You need a Jabber account and grant him administrative privileges -to enter the ejabberd web interface: +to enter the ejabberd Web Admin:

      1. Register a Jabber account on your ejabberd server, for example admin1@example.org. There are two ways to register a Jabber account: @@ -457,27 +466,34 @@ Using ejabberdctl (see section 4.1):
        % ejabberdctl register admin1 example.org FgT5bk3
         
      2. Using a Jabber client and In-Band Registration (see section 3.3.15).
      -
    2. Edit the ejabberd configuration file to give administration rights to the Jabber account you created: +
    3. Edit the ejabberd configuration file to give administration rights to the Jabber account you created:
        {acl, admins, {user, "admin1", "example.org"}}.
         {access, configure, [{allow, admins}]}.
       
      You can grant administrative privileges to many Jabber accounts, and also to accounts in other Jabber servers.
    4. Restart ejabberd to load the new configuration. -
    5. Open the web interface (http://server:port/admin/) in your +
    6. Open the Web Admin (http://server:port/admin/) in your favourite browser. Make sure to enter the full JID as username (in this example: admin1@example.org. The reason that you also need to enter the suffix, is because ejabberd’s virtual hosting support. -
    -

    Chapter 3  Configuring ejabberd

    -

    3.1  Basic Configuration

    + +

    2.6  Upgrading ejabberd

    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.

    +

    Chapter 3  Configuring ejabberd

    +

    3.1  Basic Configuration

    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 +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. -So, the configuration changes done using the web interface +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 +If you want those changes to be use after ejabberd restart, you can either edit the configuration file, or remove all its content.

    The configuration file contains a sequence of Erlang terms. Lines beginning with a ‘%’ sign are ignored. Each term is a tuple of which the first element is the name of an option, and any further elements are that option’s values. If the @@ -487,10 +503,10 @@ the configuration file:

      override_global.
       override_local.
       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) +

    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.

    -

    3.1.1  Host Names

    +

    3.1.1  Host Names

    The option hosts defines a list containing one or more domains that ejabberd will serve.

    Examples: @@ -503,7 +519,7 @@ versions:

  • Serving two domains:
      {hosts, ["example.net", "example.com"]}.
     
  • -

    3.1.2  Virtual Hosting

    +

    3.1.2  Virtual Hosting

    Options can be defined separately for every virtual host using the host_config option. It has the following @@ -572,7 +588,7 @@ instead of defining each option with the syntax {mod_echo, [{host, "mirror.two.example.org"}]} ]}]}. -

    3.1.3  Listening Ports

    +

    3.1.3  Listening Ports

    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 @@ -601,7 +617,7 @@ connections. ip, shaper ejabberd_httpDescriptionHandles incoming HTTP connections. - Optionscertfile, http_poll, + Optionscertfile, http_bind, http_poll, inet6, ip, request_handlers, tls, web_admin


    This is a detailed description of each option allowed by the listening modules: @@ -618,7 +634,17 @@ external components. The option can be either true or

    {hosts, [Hostnames], [HostOptions]}
    This option defines one or more hostnames of connected services and enables you to specify additional options including {password, Secret}. -
    http_poll
    +
    http_bind
    +This option enables HTTP Binding (XEP-0124 and XEP-0206) support. HTTP Bind +enables access via HTTP requests to ejabberd from behind firewalls which +do not allow outgoing sockets on port 5222.

    Remember that you must also install and enable the module mod_http_bind.

    If HTTP Bind is enabled, it will be available at +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 (there is a tutorial to +install JWChat with +instructions for ejabberd). +

    http_poll
    This option enables HTTP Polling (XEP-0025) support. HTTP Polling enables access via HTTP requests to ejabberd from behind firewalls which do not allow outgoing sockets on port 5222.

    If HTTP Polling is enabled, it will be available at @@ -661,7 +687,7 @@ You can define a certificate file for a specific domain using the global option the port will be encrypted using SSL immediately after connecting. You should also set the certfile option.

    web_admin
    This option -enables the web interface for ejabberd administration which is available +enables the Web Admin for ejabberd administration which is available at http://server:port/admin/. Login and password are the username and password of one of the registered users who are granted access by the ‘configure’ access rule. @@ -689,8 +715,8 @@ and also allows plain connections for old clients.
  • Port 5223 listens for c2s connections with the old SSL.
  • Port 5269 listens for s2s connections with STARTTLS.
  • Port 5280 listens for HTTP requests, and serves the HTTP Poll service. -
  • Port 5281 listens for HTTP requests, and serves the web interface using HTTPS as explained in -section 4.2. +
  • Port 5281 listens for HTTP requests, and serves the Web Admin using HTTPS as explained in +section 4.2.
  • {hosts, ["example.com", "example.org", "example.net"]}.
     {listen,
      [
    @@ -728,9 +754,9 @@ c2s connections are listened for on port 5222 and 5223 (SSL) and denied
     for the user called ‘bad’.
     
  • s2s connections are listened for on port 5269 with STARTTLS for secured traffic enabled. -
  • Port 5280 is serving the web interface and the HTTP Polling service. Note +
  • Port 5280 is serving the Web Admin and the HTTP Polling service. Note that it is also possible to serve them on different ports. The second -example in section 4.2 shows how exactly this can be done. +example in section ?? shows how exactly this can be done.
  • All users except for the administrators have a traffic of limit 1,000 Bytes/second
  • The @@ -817,7 +843,7 @@ services you have to make the transports log and do XDB by themselves: </xdb_file> </xdb>
  • -

    3.1.4  Authentication

    +

    3.1.4  Authentication

    The option auth_method defines the authentication method that is used for user authentication: @@ -929,7 +955,7 @@ attacks.

  • You may want to allow login access only for certain users. pam_listfile.so module provides such functionality.
  • -

    3.1.5  Access Rules

    +

    3.1.5  Access Rules

    ACL Definition

    @@ -1020,7 +1046,7 @@ can be either a number, or infinity. The default value is To limit the number of sessions per user to 10 for all users:

      {access, max_user_sessions, [{10, all}]}.
     
    -

    3.1.6  Shapers

    +

    3.1.6  Shapers

    Shapers enable you to limit connection traffic. The syntax of shapers is like this: @@ -1038,7 +1064,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 @@ -1051,7 +1077,7 @@ To set Russian as default language:

  • To set Spanish as default language:
      {language, "es"}.
     
  • -

    3.2  Database and LDAP Configuration

    +

    3.2  Database and LDAP Configuration

    ejabberd uses its internal Mnesia database by default. However, it is @@ -1074,14 +1100,14 @@ different storage systems for modules, and so forth.

    The following databas

  • Normally any LDAP compatible server should work; inform us about your success with a not-listed server so that we can list it here.
  • -

    3.2.1  MySQL

    +

    3.2.1  MySQL

    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. Note that the tutorial contains information about ejabberd’s configuration which is duplicate to this section.

    Moreover, the file mysql.sql in the directory src/odbc might be interesting for -you. This file contains the ejabberd schema for MySQL. At the end of the file +you. This file contains the ejabberd schema for MySQL. At the end of the file you can find information to update your database schema.

    Driver Compilation

    @@ -1089,7 +1115,7 @@ you can find information to update your database schema.

    -

    3.2.2  Microsoft SQL Server

    +

    3.2.2  Microsoft SQL Server

    Although this section will describe ejabberd’s configuration when you want to use Microsoft SQL Server, it does not describe Microsoft SQL Server’s @@ -1134,7 +1160,7 @@ installation and database creation. Check the MySQL documentation and the tutorial Using ejabberd with MySQL native driver for information regarding these topics. Note that the tutorial contains information about ejabberd’s configuration which is duplicate to this section.

    Moreover, the file mssql.sql in the directory src/odbc might be interesting for -you. This file contains the ejabberd schema for Microsoft SQL Server. At the end +you. This file contains the ejabberd schema for Microsoft SQL Server. At the end of the file you can find information to update your database schema.

    Driver Compilation

    @@ -1158,14 +1184,14 @@ 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!

    -

    3.2.3  PostgreSQL

    +

    3.2.3  PostgreSQL

    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. Note that the tutorial contains information about ejabberd’s configuration which is duplicate to this section.

    Also the file pg.sql in the directory src/odbc might be interesting for you. -This file contains the ejabberd schema for PostgreSQL. At the end of the file +This file contains the ejabberd schema for PostgreSQL. At the end of the file you can find information to update your database schema.

    Driver Compilation

    @@ -1175,7 +1201,7 @@ PostgreSQL.

    1. First, install the Erlang PgSQL library from Jungerl. Make sure the compiled files are in your Erlang path; you can put them for example in the same -directory as your ejabberd .beam files. +directory as your ejabberd .beam files.
    2. Then, configure, compile and install ejabberd with ODBC support enabled (this is also needed for native PostgreSQL support!). This can be done, by using next commands: @@ -1212,7 +1238,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!

      -

      3.2.4  ODBC Compatible

      +

      3.2.4  ODBC Compatible

      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 @@ -1225,7 +1251,7 @@ if the binary packages of ejabberd you are using include support for ODBC.

      1. First, install the Erlang MySQL library. Make sure the compiled files are in your Erlang path; you can -put them for example in the same directory as your ejabberd .beam files. +put them for example in the same directory as your ejabberd .beam files.
      2. Then, configure, compile and install ejabberd with ODBC support enabled. This can be done, by using next commands:
        ./configure --enable-odbc && make install
        @@ -1251,7 +1277,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!

        -

        3.2.5  LDAP

        +

        3.2.5  LDAP

        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 @@ -1264,7 +1290,7 @@ LDAP server. This option is required.

    ldap_port
    Port to connect to your LDAP server. The initial default value is 389, so it is used when nothing is set into the configuration file. -If you configure a value, it is stored in ejabberd’s database. +If you configure a value, it is stored in ejabberd’s database. Then, if you remove that value from the configuration file, the value previously stored in the database will be used instead of the default 389.
    ldap_rootdn
    Bind DN. The default value @@ -1421,7 +1447,7 @@ configuration is shown below:

      {auth_method, ldap}.
         ...
       }.
     
    -

    3.3  Modules Configuration

    +

    3.3  Modules Configuration

    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 @@ -1442,7 +1468,7 @@ all entries end with a comma: {mod_version, []} ]}. -

    3.3.1  Overview

    +

    3.3.1  Overview

    The following table lists all modules included in ejabberd.


    @@ -1507,7 +1533,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!

    -

    3.3.2  Common Options

    +

    3.3.2  Common Options

    The following options are used by many modules. Therefore, they are described in this separate section.

    iqdisc

    @@ -1540,7 +1566,7 @@ number of processes (32000 by default).

    host

    -

    This option defines the Jabber ID of a service provided by an ejabberd module. +

    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 in the Jabber ID mirror.example.org: @@ -1559,7 +1585,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 do these actions with their @@ -1618,8 +1644,8 @@ 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

    +disabled for instances of ejabberd with hundreds of thousands users.

    +

    3.3.4  mod_disco

    This module adds support for Service Discovery (XEP-0030). With this module enabled, services on your server can be discovered by @@ -1660,7 +1686,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 @@ -1681,7 +1707,7 @@ of them all? ... ]}. -

    3.3.6  mod_irc

    +

    3.3.6  mod_irc

    This module is an IRC transport that can be used to join channels on IRC servers.

    End user information: @@ -1741,7 +1767,7 @@ our domains and on other servers. ... ]}. -

    3.3.7  mod_last

    +

    3.3.7  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 @@ -1751,7 +1777,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.8  mod_muc

    +

    3.3.8  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: @@ -1831,7 +1857,7 @@ restriction is applied. This option can be used to protect a MUC service for users abuses, as fastly changing a user presence will result in possible large presence packet broadcast. If a user tries to change its presence more often than the specified interval, the -presence is cached by ejabberd and only the last presence is +presence is cached by ejabberd and only the last presence is broadcasted to all users in the room after expiration of the interval delay. Intermediate presence packets are silently discarded. A good value for this option is 4 seconds.

    default_room_opts
    This @@ -1929,7 +1955,7 @@ newly created chatrooms have by default those options. ... ]}. -

    3.3.9  mod_muc_log

    +

    3.3.9  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 @@ -2037,7 +2063,7 @@ top link will be the default <a href="/">Home</a>. ... ]}. -

    3.3.10  mod_offline

    +

    3.3.10  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 @@ -2049,7 +2075,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.11  mod_privacy

    +

    3.3.11  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 @@ -2078,7 +2104,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.12  mod_private

    +

    3.3.12  mod_private

    This module adds support for Private XML Storage (XEP-0049):

    @@ -2091,7 +2117,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.13  mod_proxy65

    +

    3.3.13  mod_proxy65

    This module implements SOCKS5 Bytestreams (XEP-0065). It allows ejabberd to act as a file transfer proxy between two @@ -2147,7 +2173,7 @@ The simpliest configuration of the module: ... ]}. -

    3.3.14  mod_pubsub

    +

    3.3.14  mod_pubsub

    This module offers a Publish-Subscribe Service (XEP-0060). The functionality in mod_pubsub can be extended using plugins. @@ -2181,7 +2207,7 @@ This option allows to create additional pubsub virtual hosts in a single module ... ]}. -

    3.3.15  mod_register

    +

    3.3.15  mod_register

    This module adds support for In-Band Registration (XEP-0077). This protocol enables end users to use a Jabber client to: @@ -2243,14 +2269,14 @@ example all In-Band Registration functionality is disabled: ... ]}. -

    3.3.16  mod_roster

    +

    3.3.16  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.17  mod_service_log

    +

    3.3.17  mod_service_log

    This module adds support for logging end user packets via a Jabber message auditing service such as @@ -2281,7 +2307,7 @@ To log all end user packets to the Bandersnatch service running on ... ]}. -

    3.3.18  mod_shared_roster

    +

    3.3.18  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 @@ -2290,14 +2316,14 @@ manually add all users to their rosters, and that they cannot permanently delete 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 -of the same virtual host where the group is created.

    Shared roster groups can be edited only via the web interface. Each group +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:

    Name
    The name of the group, which will be displayed in the roster.
    Description
    The description of the group. This parameter does not affect anything.
    Members
    A list of full JIDs of group members, entered one per line in -the web interface. +the Web Admin. To put as members all the registered users in the virtual hosts, you can use the special directive: @all@. Note that this directive is designed for a small server with just a few hundred users. @@ -2357,7 +2383,7 @@ roster groups as shown in the following table:
    ModuleFeatureDependenciesNeeded for XMPP?

    -

    3.3.19  mod_stats

    +

    3.3.19  mod_stats

    This module adds support for Statistics Gathering (XEP-0039). This protocol allows you to retrieve next statistics from your ejabberd deployment: @@ -2390,7 +2416,7 @@ by sending: </query> </iq> -

    3.3.20  mod_time

    +

    3.3.20  mod_time

    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: @@ -2398,7 +2424,7 @@ you are able to discover the time at another entity’s location.

    Opt iqdisc

    This specifies the processing discipline for Entity Time (jabber:iq:time) IQ queries (see section 3.3.2).
    -

    3.3.21  mod_vcard

    +

    3.3.21  mod_vcard

    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 @@ -2453,7 +2479,7 @@ and that all virtual hosts will be searched instead of only the current one: ... ]}. -

    3.3.22  mod_vcard_ldap

    +

    3.3.22  mod_vcard_ldap

    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 @@ -2625,7 +2651,7 @@ searching his info in LDAP.

  • ldap_vcard_map
  • -

    3.3.23  mod_version

    +

    3.3.23  mod_version

    This module implements Software Version (XEP-0092). Consequently, it answers ejabberd’s version when queried.

    Options: @@ -2634,25 +2660,25 @@ answers ejabberd’s version when queried.

    Options: The default value is true.

    iqdisc
    This specifies the processing discipline for Software Version (jabber:iq:version) IQ queries (see section 3.3.2). -
    -

    Chapter 4  Managing an ejabberd server

    -

    4.1  ejabberdctl

    + +

    Chapter 4  Managing an ejabberd server

    +

    4.1  ejabberdctl

    -

    4.1.1  Commands

    +

    4.1.1  Commands

    The ejabberdctl command line 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, +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:

    -start
    Start ejabberd in background mode. This is the default method. -
    debug
    Attach an Erlang shell to an already existing ejabberd server. This allows to execute commands interactively in the ejabberd server. -
    live
    Start ejabberd in live mode: the shell keeps attached to the started server, showing log messages and allowing to execute interactive commands. -

    If there is an ejabberd server running in the system, +start

    Start ejabberd in background mode. This is the default method. +
    debug
    Attach an Erlang shell to an already existing ejabberd server. This allows to execute commands interactively in the ejabberd server. +
    live
    Start ejabberd in live mode: the shell keeps attached to the started server, showing log messages and allowing to execute interactive commands. +

    If there is an ejabberd server running in the system, ejabberdctl shows all the available commands in that server. The more interesting ones are:

    -status
    Check the status of the ejabberd server. -
    stop
    Stop the ejabberd server which is running in the machine. +status
    Check the status of the ejabberd server. +
    stop
    Stop the ejabberd server which is running in the machine.
    reopen-log
    If you use a tool to rotate logs, you have to configure it so that this command is executed after each rotation.
    backup, restore, install-fallback, dump, load
    You can use these @@ -2665,9 +2691,36 @@ in offline storage. This might be useful when the number of offline messages is very high.

    The ejabberdctl script also allows the argument --node NODENAME. This allows to administer a remote node.

    The ejabberdctl administration script can be configured in the file ejabberdctl.cfg. -This file provides detailed information about each configurable option.

    -

    4.1.2  Erlang configuration

    -

    The basic parameters used by ejabberdctl when starting the Erlang node: +This file provides detailed information about each configurable option.

    +

    4.1.2  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, +which includes detailed description about them. +This section describes for reference purposes +all the environment variables and command line parameters.

    The environment variables: +

    +EJABBERD_CONFIG_PATH
    + Path to the ejabberd configuration file. +
    EJABBERD_MSGS_PATH
    + Path to the directory with translated strings. +
    EJABBERD_LOG_PATH
    + Path to the ejabberd log file. +
    EJABBERD_SO_PATH
    + Path to the directory with binary system libraries. +
    HOME
    + Path to the directory that is considered ejabberd’s home. + This path is used to read the file .erlang.cookie. +
    ERL_CRASH_DUMP
    + Path to the file where crash reports will be dumped. +
    ERL_INETRC
    + Indicates which IP name resolution to use. It is required if using -sname. +
    ERL_MAX_PORTS
    + Maximum number of simultaneously open Erlang ports. +
    ERL_MAX_ETS_TABLES
    + Maximum number of ETS and Mnesia tables. +

    The command line parameters:

    -sname ejabberd
    The Erlang node will be identified using only the first part @@ -2675,8 +2728,8 @@ This file provides detailed information about each configurable option.

    -

    4.2  Web Interface

    - -

    To perform online configuration of ejabberd you need to enable the -ejabberd_http listener with the option web_admin (see -section 3.1.3). Then you can open +You can find other options in the Erlang manual page (erl -man erl).

    +

    4.2  Web Admin

    + +

    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 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 @@ -2710,7 +2769,7 @@ you will see a page similar to figure 4.1.

    -
    +
    Figure 4.1: Top page from the web interface
    Figure 4.1: Top page from the Web Admin

    @@ -2718,12 +2777,12 @@ Here you can edit access restrictions, manage users, create backups, manage the database, enable/disable ports listened for, view server statistics,…

    Examples:

    • -You can serve the web interface on the same port as the +You can serve the Web Admin on the same port as the HTTP Polling interface. In this example you should point your web browser to http://example.org:5280/admin/ to administer all virtual hosts or to http://example.org:5280/admin/server/example.com/ to administer only -the virtual host example.com. Before you get access to the web interface +the virtual host example.com. Before you get access to the Web Admin you need to enter as username, the JID and password from a registered user that is allowed to configure ejabberd. In this example you can enter as username ‘admin@example.net’ to administer all virtual hosts (first @@ -2743,9 +2802,9 @@ administer the virtual host example.com. ... ] }. -
    • For security reasons, you can serve the web interface on a secured +
    • For security reasons, you can serve the Web Admin on a secured connection, on a port differing from the HTTP Polling interface, and bind it -to the internal LAN IP. The web interface will be accessible by pointing your +to the internal LAN IP. The Web Admin will be accessible by pointing your web browser to https://192.168.1.1:5280/admin/:
        ...
         {hosts, ["example.org"]}.
      @@ -2759,32 +2818,32 @@ web browser to https://192.168.1.1:5280/admin/:
          ]
         }.
       
    -

    4.3  Ad-hoc Commands

    +

    4.3  Ad-hoc Commands

    If you enable mod_configure and mod_adhoc, -you can perform several administrative tasks in ejabberd +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.

    -

    4.4  Change Computer Hostname

    -

    ejabberd uses the distributed Mnesia database. +

    4.4  Change Computer Hostname

    +

    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. So, the name of the Erlang node changes -if you change the name of the machine in which ejabberd runs, -or when you move ejabberd to a different machine.

    So, if you want to change the computer hostname where ejabberd is installed, +if you change the name of the machine in which ejabberd runs, +or when you move ejabberd to a different machine.

    So, if you want to change the computer hostname where ejabberd is installed, you must follow these instructions:

    1. - In the old server, backup the Mnesia database using the Web Interface or ejabberdctl. + In the old server, backup the Mnesia database using the Web Admin or ejabberdctl. For example:
      ejabberdctl backup /tmp/ejabberd-oldhost.backup
      -
    2. In the new server, restore the backup file using the Web Interface or ejabberdctl. +
    3. In the new server, restore the backup file using the Web Admin or ejabberdctl. For example:
      ejabberdctl restore /tmp/ejabberd-oldhost.backup
      -
    -

    Chapter 5  Securing ejabberd

    -

    5.1  Firewall Settings

    + +

    Chapter 5  Securing ejabberd

    +

    5.1  Firewall Settings

    You need to take the following TCP ports in mind when configuring your firewall:


    @@ -2796,24 +2855,24 @@ you must follow these instructions: port rangeUsed for connections between Erlang nodes. This range is configurable.

    -

    5.2  epmd

    +

    5.2  epmd

    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. +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 -and connects to the Erlang node that holds ejabberd. +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. You should block the port 4369 in the firewall, -so only the programs in your machine can access it.

    If you build a cluster of several ejabberd instances, -each ejabberd instance is called an ejabberd node. -Those ejabberd nodes use a special Erlang communication method to +so only the programs in your machine can access it.

    If you build a cluster of several ejabberd instances, +each ejabberd instance is called an ejabberd node. +Those ejabberd nodes use a special Erlang communication method to build the cluster, and EPMD is again needed listening in the port 4369. -So, if you plan to build a cluster of ejabberd nodes +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. @@ -2821,7 +2880,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
     
    -

    5.3  Erlang Cookie

    +

    5.3  Erlang Cookie

    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. @@ -2835,7 +2894,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.

    -

    5.4  Erlang node name

    +

    5.4  Erlang 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). @@ -2845,10 +2904,10 @@ 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.

    -

    Chapter 6  Clustering

    +

    Chapter 6  Clustering

    -

    6.1  How it Works

    +

    6.1  How it Works

    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 @@ -2863,33 +2922,33 @@ router,

  • session manager,
  • s2s manager.
  • -

    6.1.1  Router

    +

    6.1.1  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.

    -

    6.1.2  Local Router

    +

    6.1.2  Local Router

    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.

    -

    6.1.3  Session Manager

    +

    6.1.3  Session Manager

    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.

    -

    6.1.4  s2s Manager

    +

    6.1.4  s2s Manager

    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.

    -

    6.2  Clustering Setup

    +

    6.2  Clustering Setup

    Suppose you already configured ejabberd on one machine named (first), and you need to setup another one to make an ejabberd cluster. Then do @@ -2905,7 +2964,7 @@ You can check this by running the command ‘mnesia:info().&#X should see a lot of remote tables and a line like the following:

    running db nodes   = [ejabberd@first, ejabberd@second]
     
  • Now run the following in the same ‘erl’ session:
    mnesia:change_table_copy_type(schema, node(), disc_copies).
     

    This will create local disc storage for the database.

    (alt) Change storage type of the scheme table to ‘RAM and disc -copy’ on the second node via the web interface.

  • Now you can add replicas of various tables to this node with +copy’ on the second node via the Web Admin.

  • Now you can add replicas of various tables to this node with ‘mnesia:add_table_copy’ or ‘mnesia:change_table_copy_type’ as above (just replace ‘schema’ with another table name and ‘disc_copies’ @@ -2924,13 +2983,13 @@ and ‘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.

    -

    6.3  Service Load-Balancing

    -

    6.3.1  Components Load-Balancing

    +

    6.3  Service Load-Balancing

    +

    6.3.1  Components Load-Balancing

    -

    6.3.2  Domain Load-Balancing Algorithm

    +

    6.3.2  Domain Load-Balancing Algorithm

    -

    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:

    • destination: the full JID of the packet to attribute is used. @@ -2938,28 +2997,28 @@ domain.

    • bare_destination: the bare JID (without resource) of the packet to attribute is used.
    • bare_source: the bare JID (without resource) of the packet from attribute is used.

    If the value corresponding to the criteria is the same, the same component instance in the cluster will be used.

    -

    6.3.3  Load-Balancing Buckets

    +

    6.3.3  Load-Balancing Buckets

    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}
     
    -

    Chapter 7  Debugging

    +

    Chapter 7  Debugging

    -

    7.1  Watchdog Alerts

    +

    7.1  Watchdog Alerts

    -

    ejabberd includes a watchdog mechanism. -If a process in the ejabberd server consumes too much memory, +

    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 watchdog_admins - in the ejabberd configuration file. + in the ejabberd configuration file. Example configuration:

    {watchdog_admins, ["admin2@localhost", "admin2@example.org"]}.
     
    -

    7.2  Log Files

    -

    ejabberd writes messages in two log files: +

    7.2  Log Files

    +

    ejabberd writes messages in two log files:

    - ejabberd.log
    Messages reported by ejabberd code + ejabberd.log
    Messages reported by ejabberd code
    sasl.log
    Messages reported by Erlang/OTP using SASL (System Architecture Support Libraries)

    The option loglevel modifies the verbosity of the file ejabberd.log. There possible levels are: @@ -2974,13 +3033,13 @@ There possible levels are: For example, the default configuration is:

    {loglevel, 4}.
     
    -

    7.3  Debug Console

    -

    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, +

    7.3  Debug Console

    +

    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.

    -

    Appendix A  Internationalization and Localization

    +

    Appendix A  Internationalization and Localization

    All built-in modules support the xml:lang attribute inside IQ queries. Figure A.1, for example, shows the reply to the following query: @@ -2998,21 +3057,21 @@ Figure A.1, for example, shows the reply to the

    Figure A.1: Service Discovery when xml:lang=’ru’
    -

    The web interface also supports the Accept-Language HTTP header (compare +


    The Web Admin also supports the Accept-Language HTTP header (compare figure A.2 with figure 4.1)


    webadmmainru.png -
    Figure A.2: Top page from the web interface with HTTP header +
    Figure A.2: Top page from the Web Admin with HTTP header ‘Accept-Language: ru’

    -

    Appendix B  Release Notes

    +

    Appendix B  Release Notes

    Release notes are available from ejabberd Home Page

    -

    Appendix C  Acknowledgements

    +

    Appendix C  Acknowledgements

    Thanks to all people who contributed to this guide:

    -

    Appendix D  Copyright Information

    +

    Appendix D  Copyright Information

    Ejabberd Installation and Operation Guide.
    -Copyright © 2003 — 2007 Process-one

    This document is free software; you can redistribute it and/or +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 of the License, or (at your option) any later version.

    This document is distributed in the hope that it will be useful, diff --git a/doc/guide.tex b/doc/guide.tex index 9c6d504ee..9f69e6d2f 100644 --- a/doc/guide.tex +++ b/doc/guide.tex @@ -181,12 +181,13 @@ ejabberd Development Team \input{introduction} \chapter{Installing \ejabberd{}} + \section{Installing \ejabberd{} with Binary Installer} -Probably the easiest way to install an \ejabberd{} Instant Messaging server +Probably the easiest way to install an \ejabberd{} instant messaging server is using the binary installer published by Process-one. The binary installers of released \ejabberd{} versions -are available in the Process-one \ejabberd{} download page: +are available in the Process-one \ejabberd{} downloads page: \ahrefurl{http://www.process-one.net/en/ejabberd/downloads} The installer will deploy and configure a full featured \ejabberd{} @@ -198,15 +199,34 @@ In *nix systems, remember to set executable the binary installer before starting ./ejabberd-2.0.0_1-linux-x86-installer.bin \end{verbatim} +The installer generates desktop shortcuts to start and stop ejabberd. + +The Windows installer also adds ejabberd as a system service, +and a shortcut to a debug console for experienced administrators. +You can start ejabberd using the shortcut or the Windows service. +If you want ejabberd to be started automatically at boot time, +go to service settings and set ejabberd to be automatic started. + +On a Linux system, if you want ejabberd to start as daemon at boot time, +copy \term{ejabberd.init} from the bin directory to something like \term{/etc/init.d/ejabberd} +(depending on your distribution) and call \term{/etc/inid.d/ejabberd start} to start it. + +The \term{ejabberdctl} administration script is included in the \term{bin} directory. +Please refer to the section~\ref{ejabberdctl} for details about \term{ejabberdctl}, +and configurable options to fine tune the Erlang runtime system. \section{Installing \ejabberd{} with Operating System specific packages} Some Operating Systems provide a specific \ejabberd{} package adapted to -your system architecture and libraries, which also checks dependencies +the system architecture and libraries. +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 \term{/etc/init.d/ejabberd} +to start and stop \ejabberd{} as a service at boot time. + \section{Installing \ejabberd{} with CEAN} \footahref{http://cean.process-one.net/}{CEAN} @@ -215,6 +235,11 @@ packages from many Erlang programs, including \ejabberd{} and all its dependenci The binaries are available for many different system architectures, so this is an alternative to the binary installer and Operating System's \ejabberd{} packages. +You will have to create your own \ejabberd{} start +script depending of how you handle your CEAN installation. +The default \term{ejabberdctl} script is located +into \ejabberd{}'s priv directory and can be used as an example. + \section{Installing \ejabberd{} from Source Code} \label{installation} \ind{install} @@ -231,18 +256,18 @@ To compile \ejabberd{} on a `Unix-like' operating system, you need: \begin{itemize} \item GNU Make \item GCC -\item libexpat 1.95 or higher -\item Erlang/OTP R9C-2 or higher -\item OpenSSL 0.9.6 or higher (optional) -\item Zlib 1.2.3 or higher (optional) -\item GNU Iconv 1.8 or higher (optional, not needed on systems with GNU libc) +\item Libexpat 1.95 or higher +\item Erlang/OTP R10B-9 up to R11B-5. Erlang R12 releases are not yet officially supported, and are not recommended for production servers. +\item OpenSSL 0.9.6 or higher, for STARTTLS, SASL and SSL encryption. Optional, highly recommended. +\item Zlib 1.2.3 or higher, for Stream Compression support (XEP-0138). Optional. +\item GNU Iconv 1.8 or higher, for the IRC Transport (mod\_irc). Optional. Not needed on systems with GNU Libc. \end{itemize} \subsection{Download Source Code} \label{download} \ind{install!download} -Released versions of \ejabberd{} are available in the Process-one \ejabberd{} download page: +Released versions of \ejabberd{} are available in the Process-one \ejabberd{} downloads page: \ahrefurl{http://www.process-one.net/en/ejabberd/downloads} \ind{Subversion repository} @@ -261,8 +286,6 @@ To compile \ejabberd{} execute the commands: ./configure make \end{verbatim} -The compilation process may report several warnings related to unusued variables. -This is common, and is not a problem. The build configuration script provides several parameters. To get the full list run the command: @@ -335,9 +358,6 @@ The files and directories created are, by default: \ind{install!start} You can use the \term{ejabberdctl} command line administration script to start and stop \ejabberd{}. -This script is located into tools directory of sources archive. If you installed \ejabberd{} from sources, -\term{ejabberdctl} is located into destination sbin directory (default /usr/local/sbin). If you installed -\ejabberd{} with the installer, \term{ejabberdctl} is located into \ejabberd{}'s bin directory. Usage example: \begin{verbatim} @@ -352,13 +372,6 @@ $ ejabberdctl stop Please refer to the section~\ref{ejabberdctl} for details about \term{ejabberdctl}, and configurable options to fine tune the Erlang runtime system. -Note: if you installed \ejabberd{} with your distribution packaging system, \term{ejabberdctl} should be called -by an /etc/init.d/ejabberd script to allow you to start and stop \ejabberd{} as a service at boot time. - -If you installed \ejabberd{} using CEAN package, you will have to create your own \ejabberd{} start -script depending of how you handle your CEAN installation. The default \term{ejabberdctl} script is located -into \ejabberd{}'s priv directory and can be used as an example. - \subsection{Specific Notes for BSD} \label{bsd} \ind{install!bsd} @@ -463,6 +476,18 @@ to enter the \ejabberd{} Web Admin: suffix, is because \ejabberd{}'s virtual hosting support. \end{enumerate} +\section{Upgrading \ejabberd{}} + +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. + \chapter{Configuring \ejabberd{}} \section{Basic Configuration} @@ -3317,10 +3342,41 @@ The \term{ejabberdctl} administration script can be configured in the file ejabb This file provides detailed information about each configurable option. -\subsection{Erlang configuration} +\subsection{Erlang runtime system} \label{erlangconfiguration} -The basic parameters used by \term{ejabberdctl} when starting the Erlang node: +\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 \term{ejabberdctl} administration script uses many of those possibilities. +You can configure some of them with the file \term{ejabberdctl.cfg}, +which includes detailed description about them. +This section describes for reference purposes +all the environment variables and command line parameters. + +The environment variables: +\begin{description} + \titem{EJABBERD\_CONFIG\_PATH} + Path to the ejabberd configuration file. + \titem{EJABBERD\_MSGS\_PATH} + Path to the directory with translated strings. + \titem{EJABBERD\_LOG\_PATH} + Path to the ejabberd log file. + \titem{EJABBERD\_SO\_PATH} + Path to the directory with binary system libraries. + \titem{HOME} + Path to the directory that is considered \ejabberd{}'s home. + This path is used to read the file \term{.erlang.cookie}. + \titem{ERL\_CRASH\_DUMP} + Path to the file where crash reports will be dumped. + \titem{ERL\_INETRC} + Indicates which IP name resolution to use. It is required if using \term{-sname}. + \titem{ERL\_MAX\_PORTS} + Maximum number of simultaneously open Erlang ports. + \titem{ERL\_MAX\_ETS\_TABLES} + Maximum number of ETS and Mnesia tables. +\end{description} + +The command line parameters: \begin{description} \titem{-sname ejabberd} The Erlang node will be identified using only the first part @@ -3345,14 +3401,18 @@ The basic parameters used by \term{ejabberdctl} when starting the Erlang node: Specify the Mnesia database directory. \titem{-sasl sasl\_error\_logger \{file, "/var/log/ejabberd/sasl.log"\}} Specify the directory for the sasl.log file. + \titem{+K [true|false]} + Kernel polling. + \titem{-smp [auto|enable|disable]} + SMP support. + \titem{+P 250000} + Maximum number of Erlang processes. + \titem{-remsh ejabberd@localhost} + Open an Erlang shell in a remote Erlang node. \end{description} Note that some characters need to be escaped when used in shell scripts, for instance \verb|"| and \verb|{}|. You can find other options in the Erlang manual page (\shell{erl -man erl}). -In addition, there are several configurable parameters -in the file \term{/etc/ejabberd/ejabberdctl.cfg} -to fine tune the Erlang runtime system. - \section{Web Admin} \label{webadmin} diff --git a/doc/introduction.tex b/doc/introduction.tex index 9972cf74f..a82c91f9d 100644 --- a/doc/introduction.tex +++ b/doc/introduction.tex @@ -68,7 +68,7 @@ Peter Saint-Andr\'e, Executive Director of the Jabber Software Foundation} \item \marking{Internationalized:} \ejabberd{} leads in internationalization. Hence it is very well suited in a globalized world. Related features are: \begin{itemize} -\item Translated in 20 languages. %%\improved{} +\item Translated to 22 languages. %%\improved{} \item Support for \footahref{http://www.ietf.org/rfc/rfc3490.txt}{IDNA}. \end{itemize} diff --git a/doc/release_notes_2.0.0.txt b/doc/release_notes_2.0.0.txt index c0c6826fc..c9122bb3b 100644 --- a/doc/release_notes_2.0.0.txt +++ b/doc/release_notes_2.0.0.txt @@ -1,16 +1,16 @@ Release Notes - ejabberd 2.0.0 beta 1 - 24 december 2007 + ejabberd 2.0.0 rc1 + 16 January 2008 ejabberd 2.0.0 is a major new version for ejabberd adding plenty of new features, performance and scalability improvements and architectural changes. - ejabberd 2.0.0 includes near than 200 improvements over ejabberd + ejabberd 2.0.0 includes more than 200 improvements over ejabberd 1.1.x. A complete list of changes can be retrieved from: http://redir.process-one.net/ejabberd-2.0.0 - The new code can be downloaded from ejabberd download page: + The new code can be downloaded from ejabberd downloads page: http://www.process-one.net/en/ejabberd/ @@ -61,7 +61,7 @@ - Support for LDAP servers pool. - Simplified use of virtual hosting with LDAP with domain substitution in config. -- Ability to match on several userid attibutes. +- Ability to match on several userid attributes. * Multi-user chat @@ -69,7 +69,7 @@ - Clustering and load balancing support. - Ability to define default room configuration in ejabberd config file. - Many anti abuse features have been added: - . New ACL to limit the creation of persistent room to autorized users. + . New ACL to limit the creation of persistent room to authorized users. . Ability to define the maximum number of users per room. . Limitation of the rate of message and presence packets. . Limitation of the maximum number of room a user can join at the same time. @@ -94,7 +94,7 @@ an efficient alternative to HTTP polling for scalable Web based chat solutions. - HTTP module can now serve static documents (with - mod_http_fileserver). It is needed for high-performance Web2.0 chat + mod_http_fileserver). It is needed for high-performance Web 2.0 chat / IM application. System administrators can now avoid using a proxy (like Apache) that handles much less simultaneous than ejabberd HTTP module. @@ -110,13 +110,14 @@ - Dynamic log levels: Improved logging with more log levels. You can now change the loglevel at run time. No performance penalty is involved when less verbose levels are used. -- Better command-line tool, with more options available. +- The ejabberdctl command-line administration script now can start + and stop ejabberd. It also includes other useful options. * Localization - ejabberd is now available in 22 languages: Catalan, Chinese, Czech, - Dutch, English, French, Galicia, German, Italian, Japanese, Polish, + Dutch, English, French, Galician, German, Italian, Japanese, Polish, Portuguese, Portuguese (Brazil), Russian, Slovak, Spanish, Swedish, Thai, Turkish, Ukrainian, Vietnamese, Wallon. @@ -141,11 +142,26 @@ * Bugfixes -- ejabberd 2.0 also fixes numerous small bugs :) Read the full +- ejabberd 2.0.0 also fixes numerous small bugs :) Read the full changelog for details. -Bugs report + + Important Notes: + +- Since this release, ejabberd requires Erlang R10B-5 or higher. + R11B-5 is the recommended version. R12 is not yet officially + supported, and is not recommended for production servers. + +- The 'ssl' option is no longer available in the listening ports. + To get legacy SSL encryption use the option 'tls'. + +- The new ejabberdctl command line administration script can start, + stop and perform many other administrative tasks in ejabberd. + + + +Bug reports You can officially report bugs on Process-one support site: https://support.process-one.net/ diff --git a/doc/version.tex b/doc/version.tex index df42bbb79..4a7ddfe7e 100644 --- a/doc/version.tex +++ b/doc/version.tex @@ -1,2 +1,2 @@ % ejabberd version (automatically generated). -\newcommand{\version}{2.0.0-beta1} +\newcommand{\version}{2.0.0-rc1} diff --git a/src/ejabberd.hrl b/src/ejabberd.hrl index 849cc83e3..578c99cf3 100644 --- a/src/ejabberd.hrl +++ b/src/ejabberd.hrl @@ -22,7 +22,7 @@ %-define(ejabberd_debug, true). %-define(DBGFSM, true). --define(VERSION, "2.0.0-beta1"). +-define(VERSION, "2.0.0-rc1"). %% --------------------------------- %% Logging mechanism