24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-16 22:05:29 +02:00

* doc/guide.html: Regenerated

* doc/guide.tex: Fix a problem in SVN merge from trunk

SVN Revision: 1605
This commit is contained in:
Badlop 2008-10-06 15:01:06 +00:00
parent 2f8127d343
commit 10ab4e6782
2 changed files with 134 additions and 127 deletions

View File

@ -1,3 +1,7 @@
2008-10-06 Badlop <badlop@process-one.net>
* doc/guide.html: Regenerated
2008-10-06 Jerome Sautret <jerome.sautret@process-one.net>
* src/ejabberd_rdbms.erl: fix SQL database reconnection

View File

@ -272,8 +272,8 @@ Support for virtual hosting.
</LI></UL><P> <A NAME="installing"></A> </P><!--TOC chapter Installing <TT>ejabberd</TT>-->
<H1 CLASS="chapter"><!--SEC ANCHOR --><A NAME="htoc4">Chapter&#XA0;2</A>&#XA0;&#XA0;<A HREF="#installing">Installing <TT>ejabberd</TT></A></H1><!--SEC END --><P> <A NAME="installing"></A> </P><P> <A NAME="install.binary"></A> </P><!--TOC section Installing <TT>ejabberd</TT> with Binary Installer-->
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc5">2.1</A>&#XA0;&#XA0;<A HREF="#install.binary">Installing <TT>ejabberd</TT> with Binary Installer</A></H2><!--SEC END --><P> <A NAME="install.binary"></A> </P><P>Probably the easiest way to install an <TT>ejabberd</TT> instant messaging server
is using the binary installer published by ProcessOne.
The binary installers of released <TT>ejabberd</TT> versions
is using the binary installer published by ProcessOne.
The binary installers of released <TT>ejabberd</TT> versions
are available in the ProcessOne <TT>ejabberd</TT> downloads page:
<A HREF="http://www.process-one.net/en/ejabberd/downloads"><TT>http://www.process-one.net/en/ejabberd/downloads</TT></A></P><P>The installer will deploy and configure a full featured <TT>ejabberd</TT>
server and does not require any extra dependencies.</P><P>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.</P><P>In *nix systems, remem
</PRE><P><TT>ejabberd</TT> can be started manually at any time,
or automatically by the operating system at system boot time.</P><P>To start and stop <TT>ejabberd</TT> manually,
use the desktop shortcuts created by the installer.
If the machine doesn&#X2019;t have a graphical system, use the scripts &#X2019;start&#X2019;
If the machine doesn&#X2019;t have a graphical system, use the scripts &#X2019;start&#X2019;
and &#X2019;stop&#X2019; in the &#X2019;bin&#X2019; directory where <TT>ejabberd</TT> is installed.</P><P>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&#X2019;t read the file ejabberdctl.cfg.</P><P>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&#X2019;t read the file ejabberdctl.cfg.</P><P>On a *nix system, if you want ejabberd to be started as daemon at boot time,
copy <TT>ejabberd.init</TT> from the &#X2019;bin&#X2019; directory to something like <TT>/etc/init.d/ejabberd</TT>
(depending on your distribution) and call <TT>/etc/inid.d/ejabberd start</TT> to start it.</P><P>If <TT>ejabberd</TT> doesn&#X2019;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.</P><P>The <TT>ejabberdctl</TT> administration script is included in the <TT>bin</TT> directory.
Please refer to the section&#XA0;<A HREF="#ejabberdctl">4.1</A> for details about <TT>ejabberdctl</TT>,
and configurable options to fine tune the Erlang runtime system.</P><P> <A NAME="install.os"></A> </P><!--TOC section Installing <TT>ejabberd</TT> with Operating System specific packages-->
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc6">2.2</A>&#XA0;&#XA0;<A HREF="#install.os">Installing <TT>ejabberd</TT> with Operating System specific packages</A></H2><!--SEC END --><P> <A NAME="install.os"></A> </P><P>Some Operating Systems provide a specific <TT>ejabberd</TT> package adapted to
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc6">2.2</A>&#XA0;&#XA0;<A HREF="#install.os">Installing <TT>ejabberd</TT> with Operating System specific packages</A></H2><!--SEC END --><P> <A NAME="install.os"></A> </P><P>Some Operating Systems provide a specific <TT>ejabberd</TT> 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.</P><P>Usually those packages create a script like <TT>/etc/init.d/ejabberd</TT>
@ -317,12 +317,12 @@ to start and stop <TT>ejabberd</TT> as a service at boot time.</P><P> <A NAME="i
packages from many Erlang programs, including <TT>ejabberd</TT> 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&#X2019;s <TT>ejabberd</TT> packages.</P><P>You will have to create your own <TT>ejabberd</TT> start
script depending of how you handle your CEAN installation.
script depending of how you handle your CEAN installation.
The default <TT>ejabberdctl</TT> script is located
into <TT>ejabberd</TT>&#X2019;s priv directory and can be used as an example.</P><P> <A NAME="installation"></A> </P><!--TOC section Installing <TT>ejabberd</TT> from Source Code-->
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc8">2.4</A>&#XA0;&#XA0;<A HREF="#installation">Installing <TT>ejabberd</TT> from Source Code</A></H2><!--SEC END --><P> <A NAME="installation"></A>
</P><P>The canonical form for distribution of <TT>ejabberd</TT> stable releases is the source code package.
Compiling <TT>ejabberd</TT> from source code is quite easy in *nix systems,
Compiling <TT>ejabberd</TT> from source code is quite easy in *nix systems,
as long as your system have all the dependencies.</P><P> <A NAME="installreq"></A> </P><!--TOC subsection Requirements-->
<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc9">2.4.1</A>&#XA0;&#XA0;<A HREF="#installreq">Requirements</A></H3><!--SEC END --><P> <A NAME="installreq"></A>
</P><P>To compile <TT>ejabberd</TT> on a &#X2018;Unix-like&#X2019; operating system, you need:
@ -350,10 +350,10 @@ To get the full list run the command:
</P><PRE CLASS="verbatim">./configure --help
</PRE><P>Some options that you may be interested in modifying:
</P><DL CLASS="description"><DT CLASS="dt-description">
<B><TT>--prefix=/</TT></B></DT><DD CLASS="dd-description">
<B><TT>--prefix=/</TT></B></DT><DD CLASS="dd-description">
Specify the path prefix where the files will be copied when running
the <TT>make install</TT> command.<P> </P></DD><DT CLASS="dt-description"><B><TT>--enable-user[=USER]</TT></B></DT><DD CLASS="dd-description">
Allow this normal system user to execute the ejabberdctl script
Allow this normal system user to execute the ejabberdctl script
(see section&#XA0;<A HREF="#ejabberdctl">4.1</A>),
read the configuration files,
read and write in the spool directory,
@ -361,14 +361,14 @@ To get the full list run the command:
The account user and group must exist in the machine
before running <TT>make install</TT>.
This account doesn&#X2019;t need an explicit HOME directory, because
<TT>/var/lib/ejabberd/</TT> will be used by default.<P> </P></DD><DT CLASS="dt-description"><B><TT>--enable-pam</TT></B></DT><DD CLASS="dd-description">
<TT>/var/lib/ejabberd/</TT> will be used by default.<P> </P></DD><DT CLASS="dt-description"><B><TT>--enable-pam</TT></B></DT><DD CLASS="dd-description">
Enable the PAM authentication method (see section <A HREF="#pam">3.1.4</A>).<P> </P></DD><DT CLASS="dt-description"><B><TT>--enable-odbc or --enable-mssql</TT></B></DT><DD CLASS="dd-description">
Required if you want to use an external database.
See section&#XA0;<A HREF="#database">3.2</A> for more information.<P> </P></DD><DT CLASS="dt-description"><B><TT>--enable-full-xml</TT></B></DT><DD CLASS="dd-description">
See section&#XA0;<A HREF="#database">3.2</A> for more information.<P> </P></DD><DT CLASS="dt-description"><B><TT>--enable-full-xml</TT></B></DT><DD CLASS="dd-description">
Enable the use of XML based optimisations.
It will for example use CDATA to escape characters in the XMPP stream.
It will for example use CDATA to escape characters in the XMPP stream.
Use this option only if you are sure your Jabber clients include a fully compliant XML parser.<P> </P></DD><DT CLASS="dt-description"><B><TT>--disable-transient-supervisors</TT></B></DT><DD CLASS="dd-description">
Disable the use of Erlang/OTP supervision for transient processes.
Disable the use of Erlang/OTP supervision for transient processes.
</DD></DL><P> <A NAME="install"></A> </P><!--TOC subsection Install-->
<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc12">2.4.4</A>&#XA0;&#XA0;<A HREF="#install">Install</A></H3><!--SEC END --><P> <A NAME="install"></A>
</P><P>To install <TT>ejabberd</TT> in the destination directories, run the command:
@ -432,8 +432,8 @@ and configurable options to fine tune the Erlang runtime system.</P><P> <A NAME=
</P><P>You need to have <TT>GNU install</TT>,
but it isn&#X2019;t included in Solaris.
It can be easily installed if your Solaris system
is set up for <A HREF="http://www.blastwave.org/">blastwave.org</A>
package repository.
is set up for <A HREF="http://www.blastwave.org/">blastwave.org</A>
package repository.
Make sure <TT>/opt/csw/bin</TT> is in your <TT>PATH</TT> and run:
</P><PRE CLASS="verbatim">pkg-get -i fileutils
</PRE><P>If that program is called <TT>ginstall</TT>,
@ -471,8 +471,8 @@ directory, you can add the directories
<CODE>C:\sdk\GnuWin32\bin</CODE> to the <CODE>PATH</CODE> environment
variable.
</P></LI><LI CLASS="li-enumerate">Install OpenSSL in <CODE>C:\sdk\OpenSSL</CODE> and add <CODE>C:\sdk\OpenSSL\lib\VC</CODE> to your path or copy the binaries to your system directory.
</LI><LI CLASS="li-enumerate">Install ZLib in <CODE>C:\sdk\gnuWin32</CODE>. Copy
<CODE>C:\sdk\GnuWin32\bin\zlib1.dll</CODE> to your system directory. If you change your path it should already be set after libiconv install.
</LI><LI CLASS="li-enumerate">Install ZLib in <CODE>C:\sdk\gnuWin32</CODE>. Copy
<CODE>C:\sdk\GnuWin32\bin\zlib1.dll</CODE> to your system directory. If you change your path it should already be set after libiconv install.
</LI><LI CLASS="li-enumerate">Make sure the you can access Erlang binaries from your path. For example: <CODE>set PATH=%PATH%;"C:\sdk\erl5.5.5\bin"</CODE>
</LI><LI CLASS="li-enumerate">Depending on how you end up actually installing the library you might need to check and tweak the paths in the file configure.erl.
</LI><LI CLASS="li-enumerate">While in the directory <CODE>ejabberd\src</CODE> run:
@ -484,7 +484,7 @@ nmake -f Makefile.win32
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc17">2.5</A>&#XA0;&#XA0;<A HREF="#initialadmin">Create a Jabber Account for Administration</A></H2><!--SEC END --><P> <A NAME="initialadmin"></A> </P><P>You need a Jabber account and grant him administrative privileges
to enter the <TT>ejabberd</TT> Web Admin:
</P><OL CLASS="enumerate" type=1><LI CLASS="li-enumerate">
Register a Jabber account on your <TT>ejabberd</TT> server, for example <TT>admin1@example.org</TT>.
Register a Jabber account on your <TT>ejabberd</TT> server, for example <TT>admin1@example.org</TT>.
There are two ways to register a Jabber account:
<OL CLASS="enumerate" type=a><LI CLASS="li-enumerate">
Using <TT>ejabberdctl</TT> (see section&#XA0;<A HREF="#ejabberdctl">4.1</A>):
@ -504,7 +504,7 @@ suffix, is because <TT>ejabberd</TT>&#X2019;s virtual hosting support.
</LI></OL><P> <A NAME="upgrade"></A> </P><!--TOC section Upgrading <TT>ejabberd</TT>-->
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc18">2.6</A>&#XA0;&#XA0;<A HREF="#upgrade">Upgrading <TT>ejabberd</TT></A></H2><!--SEC END --><P> <A NAME="upgrade"></A> </P><P>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.</P><P><TT>ejabberd</TT> 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.</P><P> <A NAME="configure"></A>
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc20">3.1</A>&#XA0;&#XA0;<A HREF="#basicconfig">Basic Configuration</A></H2><!--SEC END --><P> <A NAME="basicconfig"></A> </P><P>The configuration file will be loaded the first time you start <TT>ejabberd</TT>. The
content from this file will be parsed and stored in the internal <TT>ejabberd</TT> 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. </P><P>Note that <TT>ejabberd</TT> never edits the configuration file.
configuration file are appended to the entries in the database.</P><P>Note that <TT>ejabberd</TT> 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 <TT>ejabberd</TT> restart, you can either
@ -625,7 +625,7 @@ Port number.
</LI></UL><P>
The available modules, their purpose and the options allowed by each one are:
</P><DL CLASS="description"><DT CLASS="dt-description">
<B><TT>ejabberd_c2s</TT></B></DT><DD CLASS="dd-description">
<B><TT>ejabberd_c2s</TT></B></DT><DD CLASS="dd-description">
Handles c2s connections.<BR>
Options: <TT>access</TT>, <TT>certfile</TT>, <TT>inet6</TT>,
<TT>ip</TT>, <TT>max_stanza_size</TT>, <TT>shaper</TT>,
@ -635,7 +635,7 @@ Handles c2s connections.<BR>
Handles incoming s2s connections.<BR>
Options: <TT>inet6</TT>, <TT>ip</TT>, <TT>max_stanza_size</TT>
</DD><DT CLASS="dt-description"><B><TT>ejabberd_service</TT></B></DT><DD CLASS="dd-description">
Interacts with an <A HREF="http://www.ejabberd.im/tutorials-transports">external component</A>
Interacts with an <A HREF="http://www.ejabberd.im/tutorials-transports">external component</A>
(as defined in the Jabber Component Protocol (<A HREF="http://www.xmpp.org/extensions/xep-0114.html">XEP-0114</A>).<BR>
Options: <TT>access</TT>, <TT>hosts</TT>, <TT>inet6</TT>,
<TT>ip</TT>, <TT>shaper</TT>, <TT>service_check_from</TT>
@ -670,7 +670,7 @@ do not allow outgoing sockets on port 5222.<P>Remember that you must also instal
<CODE>http://server:port/http-bind/</CODE>. 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
<A HREF="http://jwchat.sourceforge.net/">JWChat</A>
<A HREF="http://jwchat.sourceforge.net/">JWChat</A>
(check the tutorials to install JWChat with ejabberd and an
<A HREF="http://www.ejabberd.im/jwchat-localserver">embedded local web server</A>
or <A HREF="http://www.ejabberd.im/jwchat-apache">Apache</A>).
@ -684,7 +684,7 @@ interesting to host a web-based Jabber client such as
<A HREF="http://jwchat.sourceforge.net/">JWChat</A>.
</P></DD><DT CLASS="dt-description"><B><TT>inet6</TT></B></DT><DD CLASS="dd-description"> Set up the socket for IPv6 instead of IPv4.
Note: this option is not required for S2S outgoing connections,
because when ejabberd attempts to establish a S2S outgoing connection
because when ejabberd attempts to establish a S2S outgoing connection
it first tries IPv4, and if that fails it attempts with IPv6.
</DD><DT CLASS="dt-description"><B><TT>{ip, IPAddress}</TT></B></DT><DD CLASS="dd-description"> This option specifies which network
interface to listen for. For example <CODE>{ip, {192, 168, 1, 1}}</CODE>.
@ -716,7 +716,7 @@ You should also set the <TT>certfile</TT> option.
You can define a certificate file for a specific domain using the global option <TT>domain_certfile</TT>.
</DD><DT CLASS="dt-description"><B><TT>starttls_required</TT></B></DT><DD CLASS="dd-description"> This option
specifies that STARTTLS encryption is required on connections to the port.
No unencrypted connections will be allowed.
No unencrypted connections will be allowed.
You should also set the <TT>certfile</TT> option.
You can define a certificate file for a specific domain using the global option <TT>domain_certfile</TT>.
</DD><DT CLASS="dt-description"><B><TT>tls</TT></B></DT><DD CLASS="dd-description"> This option specifies that traffic on
@ -747,7 +747,7 @@ The default policy for incoming and outgoing s2s connections to other Jabber ser
The default value is <TT>allow</TT>.
</DD><DT CLASS="dt-description"><B><TT>{{s2s_host, Host}, allow|deny}</TT></B></DT><DD CLASS="dd-description">
Defines if incoming and outgoing s2s connections with a specific remote host are allowed or denied.
This allows to restrict ejabberd to only establish s2s connections
This allows to restrict ejabberd to only establish s2s connections
with a small list of trusted servers, or to block some specific servers.
</DD><DT CLASS="dt-description"><B><TT>{s2s_max_retry_delay, Seconds}</TT></B></DT><DD CLASS="dd-description">
The maximum allowed delay for retry to connect after a failed connection attempt.
@ -756,7 +756,7 @@ Specified in seconds. The default value is 300 seconds (5 minutes).
</P><UL CLASS="itemize"><LI CLASS="li-itemize">
There are three domains. The default certificate file is <TT>server.pem</TT>.
However, the c2s and s2s connections to the domain <TT>example.com</TT> use the file <TT>example_com.pem</TT>.
</LI><LI CLASS="li-itemize">Port 5222 listens for c2s connections with STARTTLS,
</LI><LI CLASS="li-itemize">Port 5222 listens for c2s connections with STARTTLS,
and also allows plain connections for old clients.
</LI><LI CLASS="li-itemize">Port 5223 listens for c2s connections with the old SSL.
</LI><LI CLASS="li-itemize">Port 5269 listens for s2s connections with STARTTLS.
@ -767,7 +767,7 @@ section&#XA0;<A HREF="#webadmin">4.2</A>.
{listen,
[
{5222, ejabberd_c2s, [
{access, c2s},
{access, c2s},
{shaper, c2s_shaper},
starttls, {certfile, "/etc/ejabberd/server.pem"},
{max_stanza_size, 65536}
@ -805,7 +805,7 @@ only two servers can connect: "jabber.example.org" and "example.com".
</LI><LI CLASS="li-itemize">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&#XA0;<A HREF="#webadmin">4.2</A> shows how exactly this can be done.
</LI><LI CLASS="li-itemize">All users except for the administrators have a traffic of limit
</LI><LI CLASS="li-itemize">All users except for the administrators have a traffic of limit
1,000&#XA0;Bytes/second
</LI><LI CLASS="li-itemize">The
<A HREF="http://www.ejabberd.im/pyaimt">AIM transport</A>
@ -1123,7 +1123,7 @@ following syntax:
</P><PRE CLASS="verbatim">{maxrate, &lt;rate&gt;}
</PRE><P>where <TT>&lt;rate&gt;</TT> stands for the maximum allowed incoming rate in bytes per
second.
When a connection exceeds this limit, <TT>ejabberd</TT> stops reading from the socket
When a connection exceeds this limit, <TT>ejabberd</TT> stops reading from the socket
until the average rate is again below the allowed maximum.</P><P>Examples:
</P><UL CLASS="itemize"><LI CLASS="li-itemize">
To define a shaper named &#X2018;<TT>normal</TT>&#X2019; with traffic speed limited to
@ -1167,7 +1167,7 @@ The default value is: <TT>all</TT>
If such an option is present, the option will not be accepted.
The file is in a subdirectory from where the main configuration file is.
</P><PRE CLASS="verbatim">{include_config_file, "./example.org/additional_not_listen.cfg", [{disallow, [listen]}]}.
</PRE><P>In this example, <TT>ejabberd.cfg</TT> defines some ACL and Access rules,
</PRE><P>In this example, <TT>ejabberd.cfg</TT> defines some ACL and Access rules,
and later includes another file with additional rules:
</P><PRE CLASS="verbatim">{acl, admin, {user, "admin", "localhost"}}.
{access, announce, [{allow, admin}]}.
@ -1257,11 +1257,14 @@ you. This file contains the <TT>ejabberd</TT> schema for MySQL. At the end of th
you can find information to update your database schema.</P><P>By default <TT>ejabberd</TT> opens 10 connections to the database for each virtual host.
Use this option to modify the value:
</P><PRE CLASS="verbatim">{odbc_pool_size, 10}.
</PRE><P>You can configure an interval to make a dummy SQL request
to keep alive the connections to the database.
The default value is &#X2019;undefined&#X2019;, so no keepalive requests are made.
</PRE><P>You can configure an interval to make a dummy SQL request
to keep alive the connections to the database.
The default value is &#X2019;undefined&#X2019;, so no keepalive requests are made.
Specify in seconds: for example 28800 means 8 hours.
</P><PRE CLASS="verbatim">{odbc_keepalive_interval, undefined}.
</PRE><P>If the connection to the database fails, <TT>ejabberd</TT> waits 30 seconds before retrying.
You can modify this interval with this option:
</P><PRE CLASS="verbatim">{odbc_start_interval, 30}.
</PRE><P> <A NAME="compilemysql"></A> </P><!--TOC subsubsection Driver Compilation-->
<H4 CLASS="subsubsection"><!--SEC ANCHOR --><A HREF="#compilemysql">Driver Compilation</A></H4><!--SEC END --><P> <A NAME="compilemysql"></A>
</P><P>You can skip this step if you installed <TT>ejabberd</TT> using a binary installer or
@ -1314,9 +1317,9 @@ you. This file contains the <TT>ejabberd</TT> schema for Microsoft SQL Server. A
of the file you can find information to update your database schema.</P><P>By default <TT>ejabberd</TT> opens 10 connections to the database for each virtual host.
Use this option to modify the value:
</P><PRE CLASS="verbatim">{odbc_pool_size, 10}.
</PRE><P>You can configure an interval to make a dummy SQL request
to keep alive the connections to the database.
The default value is &#X2019;undefined&#X2019;, so no keepalive requests are made.
</PRE><P>You can configure an interval to make a dummy SQL request
to keep alive the connections to the database.
The default value is &#X2019;undefined&#X2019;, so no keepalive requests are made.
Specify in seconds: for example 28800 means 8 hours.
</P><PRE CLASS="verbatim">{odbc_keepalive_interval, undefined}.
</PRE><P> <A NAME="compilemssql"></A> </P><!--TOC subsubsection Driver Compilation-->
@ -1349,9 +1352,9 @@ This file contains the <TT>ejabberd</TT> schema for PostgreSQL. At the end of th
you can find information to update your database schema.</P><P>By default <TT>ejabberd</TT> opens 10 connections to the database for each virtual host.
Use this option to modify the value:
</P><PRE CLASS="verbatim">{odbc_pool_size, 10}.
</PRE><P>You can configure an interval to make a dummy SQL request
to keep alive the connections to the database.
The default value is &#X2019;undefined&#X2019;, so no keepalive requests are made.
</PRE><P>You can configure an interval to make a dummy SQL request
to keep alive the connections to the database.
The default value is &#X2019;undefined&#X2019;, so no keepalive requests are made.
Specify in seconds: for example 28800 means 8 hours.
</P><PRE CLASS="verbatim">{odbc_keepalive_interval, undefined}.
</PRE><P> <A NAME="compilepgsql"></A> </P><!--TOC subsubsection Driver Compilation-->
@ -1360,7 +1363,7 @@ Specify in seconds: for example 28800 means 8 hours.
if the binary packages of <TT>ejabberd</TT> you are using include support for
PostgreSQL.</P><OL CLASS="enumerate" type=1><LI CLASS="li-enumerate">
First, install the Erlang pgsql library from
<A HREF="http://www.ejabberd.im/ejabberd-modules/">ejabberd-modules SVN repository</A>.
<A HREF="http://www.ejabberd.im/ejabberd-modules/">ejabberd-modules SVN repository</A>.
Make sure the compiled
files are in your Erlang path; you can put them for example in the same
directory as your <TT>ejabberd</TT> .beam files.
@ -1406,9 +1409,9 @@ contains information about <TT>ejabberd</TT>&#X2019;s configuration which is dup
this section.</P><P>By default <TT>ejabberd</TT> opens 10 connections to the database for each virtual host.
Use this option to modify the value:
</P><PRE CLASS="verbatim">{odbc_pool_size, 10}.
</PRE><P>You can configure an interval to make a dummy SQL request
to keep alive the connections to the database.
The default value is &#X2019;undefined&#X2019;, so no keepalive requests are made.
</PRE><P>You can configure an interval to make a dummy SQL request
to keep alive the connections to the database.
The default value is &#X2019;undefined&#X2019;, so no keepalive requests are made.
Specify in seconds: for example 28800 means 8 hours.
</P><PRE CLASS="verbatim">{odbc_keepalive_interval, undefined}.
</PRE><P> <A NAME="compileodbc"></A> </P><!--TOC subsubsection Driver Compilation-->
@ -1445,17 +1448,17 @@ module loaded!</P><P> <A NAME="ldap"></A> </P><!--TOC subsection LDAP-->
</P><P><TT>ejabberd</TT> 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.</P><P>Note that <TT>ejabberd</TT> 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.</P><P> <A NAME="ldapconnection"></A> </P><!--TOC subsubsection Connection-->
<H4 CLASS="subsubsection"><!--SEC ANCHOR --><A HREF="#ldapconnection">Connection</A></H4><!--SEC END --><P> <A NAME="ldapconnection"></A> </P><P>Parameters:
</P><DL CLASS="description"><DT CLASS="dt-description">
<B><TT>ldap_servers</TT></B></DT><DD CLASS="dd-description"> List of IP addresses or DNS names of your
LDAP servers. This option is required.
</DD><DT CLASS="dt-description"><B><TT>ldap_port</TT></B></DT><DD CLASS="dd-description"> Port to connect to your LDAP server.
The initial default value is&#XA0;389, so it is used when nothing is set into the
configuration file.
If you configure a value, it is stored in <TT>ejabberd</TT>&#X2019;s database.
Then, if you remove that value from the configuration file,
The initial default value is&#XA0;389, so it is used when nothing is set into the
configuration file.
If you configure a value, it is stored in <TT>ejabberd</TT>&#X2019;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.
</DD><DT CLASS="dt-description"><B><TT>ldap_rootdn</TT></B></DT><DD CLASS="dd-description"> Bind DN. The default value
is&#XA0;<TT>""</TT> which means &#X2018;anonymous connection&#X2019;.
@ -1739,7 +1742,7 @@ number of processes (32000 by default).
<H4 CLASS="subsubsection"><!--SEC ANCHOR --><A HREF="#modhostoption"><TT>host</TT></A></H4><!--SEC END --><P> <A NAME="modhostoption"></A>
</P><P>This option defines the Jabber ID of a service provided by an <TT>ejabberd</TT> module.
The keyword "@HOST@" is replaced at start time with the real virtual host string.</P><P>This example configures
the echo module to provide its echoing service
the echo module to provide its echoing service
in the Jabber ID <TT>mirror.example.org</TT>:
</P><PRE CLASS="verbatim">{modules,
[
@ -1758,7 +1761,7 @@ the "@HOST@" keyword must be used:
</PRE><P> <A NAME="modannounce"></A> </P><!--TOC subsection <TT>mod_announce</TT>-->
<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc39">3.3.3</A>&#XA0;&#XA0;<A HREF="#modannounce"><TT>mod_announce</TT></A></H3><!--SEC END --><P> <A NAME="modannounce"></A>
</P><P>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.</P><P>The Ad-hoc commands are listed in the Server Discovery.
@ -1832,7 +1835,7 @@ for the superseded Jabber Browsing (<A HREF="http://www.xmpp.org/extensions/xep-
the newer Service Discovery protocol if you want them be able to discover
the services you offer.</P><P>Options:
</P><DL CLASS="description"><DT CLASS="dt-description">
<B><TT>iqdisc</TT></B></DT><DD CLASS="dd-description"> This specifies
<B><TT>iqdisc</TT></B></DT><DD CLASS="dd-description"> This specifies
the processing discipline for Service Discovery (<TT>http://jabber.org/protocol/disco#items</TT> and
<TT>http://jabber.org/protocol/disco#info</TT>) IQ queries (see section&#XA0;<A HREF="#modiqdiscoption">3.3.2</A>).
</DD><DT CLASS="dt-description"><B><TT>extra_domains</TT></B></DT><DD CLASS="dd-description"> With this option,
@ -1948,7 +1951,7 @@ discover when a disconnected user last accessed the server, to know when a
connected user was last active on the server, or to query the uptime of the
<TT>ejabberd</TT> server.</P><P>Options:
</P><DL CLASS="description"><DT CLASS="dt-description">
<B><TT>iqdisc</TT></B></DT><DD CLASS="dd-description"> This specifies
<B><TT>iqdisc</TT></B></DT><DD CLASS="dd-description"> This specifies
the processing discipline for Last activity (<TT>jabber:iq:last</TT>) IQ queries (see section&#XA0;<A HREF="#modiqdiscoption">3.3.2</A>).
</DD></DL><P> <A NAME="modmuc"></A> </P><!--TOC subsection <TT>mod_muc</TT>-->
<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc44">3.3.8</A>&#XA0;&#XA0;<A HREF="#modmuc"><TT>mod_muc</TT></A></H3><!--SEC END --><P> <A NAME="modmuc"></A>
@ -1963,7 +1966,7 @@ Sending public and private messages to room occupants.
</LI><LI CLASS="li-itemize">Kicking and banning occupants.
</LI></UL><P>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.</P><P>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.
</DD><DT CLASS="dt-description"><B><TT>default_room_options</TT></B></DT><DD CLASS="dd-description">
This module option allows to define the desired default room options.
Note that the creator of a room can modify the options of his room
Note that the creator of a room can modify the options of his room
at any time using a Jabber client with MUC capability.
The available room options and the default values are:
<DL CLASS="description"><DT CLASS="dt-description">
@ -2217,7 +2220,7 @@ directory. The default value is <TT>"www/muc"</TT>.
To prevent spam, the <TT>spam_prevention</TT> option adds a special attribute
to links that prevent their indexation by search engines. The default value
is <TT>true</TT>, which mean that nofollow attributes will be added to user
submitted links.
submitted links.
</DD><DT CLASS="dt-description"><B><TT>timezone</TT></B></DT><DD CLASS="dd-description">
The time zone for the logs is configurable with this option. Allowed values
are <TT>local</TT> and <TT>universal</TT>. With the first value, the local time,
@ -2313,7 +2316,7 @@ subscription type (or globally).
(from <A HREF="http://www.xmpp.org/specs/rfc3921.html#privacy"><TT>http://www.xmpp.org/specs/rfc3921.html#privacy</TT></A>)
</BLOCKQUOTE><P>Options:
</P><DL CLASS="description"><DT CLASS="dt-description">
<B><TT>iqdisc</TT></B></DT><DD CLASS="dd-description"> This specifies
<B><TT>iqdisc</TT></B></DT><DD CLASS="dd-description"> This specifies
the processing discipline for Blocking Communication (<TT>jabber:iq:privacy</TT>) IQ queries (see section&#XA0;<A HREF="#modiqdiscoption">3.3.2</A>).
</DD></DL><P> <A NAME="modprivate"></A> </P><!--TOC subsection <TT>mod_private</TT>-->
<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc48">3.3.12</A>&#XA0;&#XA0;<A HREF="#modprivate"><TT>mod_private</TT></A></H3><!--SEC END --><P> <A NAME="modprivate"></A>
@ -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 (<A HREF="http://www.xmpp.org/extensions/xep-0048.html">XEP-0048</A>).
</BLOCKQUOTE><P>Options:
</P><DL CLASS="description"><DT CLASS="dt-description">
<B><TT>iqdisc</TT></B></DT><DD CLASS="dd-description"> This specifies
<B><TT>iqdisc</TT></B></DT><DD CLASS="dd-description"> This specifies
the processing discipline for Private XML Storage (<TT>jabber:iq:private</TT>) IQ queries (see section&#XA0;<A HREF="#modiqdiscoption">3.3.2</A>).
</DD></DL><P> <A NAME="modproxy"></A> </P><!--TOC subsection <TT>mod_proxy65</TT>-->
<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc49">3.3.13</A>&#XA0;&#XA0;<A HREF="#modproxy"><TT>mod_proxy65</TT></A></H3><!--SEC END --><P> <A NAME="modproxy"></A>
@ -2402,7 +2405,7 @@ ACL and ACCESS. The default value is <TT>pubsub_createnode</TT>. </DD><DT CLASS=
pubsub plugin is always used.
</DD><DT CLASS="dt-description"><B><TT>nodetree</TT></B></DT><DD CLASS="dd-description"> To specify which nodetree to use. If not defined, the default pubsub
nodetree is used. Nodetrees are default and virtual. Only one nodetree can be used
and is shared by all node plugins.
and is shared by all node plugins.
</DD></DL><P>Example:
</P><PRE CLASS="verbatim">{modules,
[
@ -2428,12 +2431,12 @@ rules to restrict registration. If a rule returns &#X2018;deny&#X2019; on the re
user name, registration for that user name is denied. (there are no
restrictions by default).
</DD><DT CLASS="dt-description"><B><TT>welcome_message</TT></B></DT><DD CLASS="dd-description"> Set a welcome message that
is sent to each newly registered account. The first string is the subject, and
is sent to each newly registered account. The first string is the subject, and
the second string is the message body.
In the body you can set a newline with the characters: <CODE>\n</CODE>
</DD><DT CLASS="dt-description"><B><TT>registration_watchers</TT></B></DT><DD CLASS="dd-description"> This option defines a
</DD><DT CLASS="dt-description"><B><TT>registration_watchers</TT></B></DT><DD CLASS="dd-description"> This option defines a
list of JIDs which will be notified each time a new account is registered.
</DD><DT CLASS="dt-description"><B><TT>iqdisc</TT></B></DT><DD CLASS="dd-description"> This specifies
</DD><DT CLASS="dt-description"><B><TT>iqdisc</TT></B></DT><DD CLASS="dd-description"> This specifies
the processing discipline for In-Band Registration (<TT>jabber:iq:register</TT>) IQ queries (see section&#XA0;<A HREF="#modiqdiscoption">3.3.2</A>).
</DD></DL><P>This module reads also another option defined globably for the server:
<TT>{registration_timeout, Timeout}</TT>.
@ -2490,7 +2493,7 @@ Also define a registration timeout of one hour:
<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc52">3.3.16</A>&#XA0;&#XA0;<A HREF="#modroster"><TT>mod_roster</TT></A></H3><!--SEC END --><P> <A NAME="modroster"></A>
</P><P>This module implements roster management as defined in <A HREF="http://www.xmpp.org/specs/rfc3921.html#roster">RFC 3921: XMPP IM</A>.</P><P>Options:
</P><DL CLASS="description"><DT CLASS="dt-description">
<B><TT>iqdisc</TT></B></DT><DD CLASS="dd-description"> This specifies
<B><TT>iqdisc</TT></B></DT><DD CLASS="dd-description"> This specifies
the processing discipline for Roster Management (<TT>jabber:iq:roster</TT>) IQ queries (see section&#XA0;<A HREF="#modiqdiscoption">3.3.2</A>).
</DD></DL><P> <A NAME="modservicelog"></A> </P><!--TOC subsection <TT>mod_service_log</TT>-->
<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc53">3.3.17</A>&#XA0;&#XA0;<A HREF="#modservicelog"><TT>mod_service_log</TT></A></H3><!--SEC END --><P> <A NAME="modservicelog"></A>
@ -2513,7 +2516,7 @@ To log all end user packets to the Bandersnatch service running on
...
]}.
</PRE></LI><LI CLASS="li-itemize">To log all end user packets to the Bandersnatch service running on
<TT>bandersnatch.example.com</TT> and the backup service on
<TT>bandersnatch.example.com</TT> and the backup service on
<TT>bandersnatch.example.org</TT>:
<PRE CLASS="verbatim">{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.</P><P>Shared roster groups can be edited <EM>only</EM> via the Web Admin. Each group
has a unique identification and the following parameters:
</P><DL CLASS="description"><DT CLASS="dt-description">
@ -2608,7 +2611,7 @@ Total number of registered users on the current virtual host (users/total).
</LI><LI CLASS="li-itemize">Total number of online users on all virtual hosts (users/all-hosts/online).
</LI></UL><P>Options:
</P><DL CLASS="description"><DT CLASS="dt-description">
<B><TT>iqdisc</TT></B></DT><DD CLASS="dd-description"> This specifies
<B><TT>iqdisc</TT></B></DT><DD CLASS="dd-description"> This specifies
the processing discipline for Statistics Gathering (<TT>http://jabber.org/protocol/stats</TT>) IQ queries (see section&#XA0;<A HREF="#modiqdiscoption">3.3.2</A>).
</DD></DL><P>As there are only a small amount of clients (for example
<A HREF="http://tkabber.jabber.ru/">Tkabber</A>) and software libraries with
@ -2634,7 +2637,7 @@ by sending:
</P><P>This module features support for Entity Time (<A HREF="http://www.xmpp.org/extensions/xep-0090.html">XEP-0090</A>). By using this XEP,
you are able to discover the time at another entity&#X2019;s location.</P><P>Options:
</P><DL CLASS="description"><DT CLASS="dt-description">
<B><TT>iqdisc</TT></B></DT><DD CLASS="dd-description"> This specifies
<B><TT>iqdisc</TT></B></DT><DD CLASS="dd-description"> This specifies
the processing discipline for Entity Time (<TT>jabber:iq:time</TT>) IQ queries (see section&#XA0;<A HREF="#modiqdiscoption">3.3.2</A>).
</DD></DL><P> <A NAME="modvcard"></A> </P><!--TOC subsection <TT>mod_vcard</TT>-->
<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc57">3.3.21</A>&#XA0;&#XA0;<A HREF="#modvcard"><TT>mod_vcard</TT></A></H3><!--SEC END --><P> <A NAME="modvcard"></A>
@ -2649,7 +2652,7 @@ service. If the <TT>host</TT> option is not specified, the Jabber ID will be the
hostname of the virtual host with the prefix &#X2018;<TT>vjud.</TT>&#X2019;. The keyword "@HOST@"
is replaced at start time with the real virtual host name.
</DD><DT CLASS="dt-description"><B><TT>iqdisc</TT></B></DT><DD CLASS="dd-description"> This specifies
</DD><DT CLASS="dt-description"><B><TT>iqdisc</TT></B></DT><DD CLASS="dd-description"> This specifies
the processing discipline for <TT>vcard-temp</TT> IQ queries (see section&#XA0;<A HREF="#modiqdiscoption">3.3.2</A>).
</DD><DT CLASS="dt-description"><B><TT>search</TT></B></DT><DD CLASS="dd-description">This option specifies whether the search
functionality is enabled (value: <TT>true</TT>) or disabled (value:
@ -2696,7 +2699,7 @@ and that all virtual hosts will be searched instead of only the current one:
</P><P><TT>ejabberd</TT> can map LDAP attributes to vCard fields. This behaviour is
implemented in the <TT>mod_vcard_ldap</TT> module. This module does not depend on the
authentication method (see&#XA0;<A HREF="#ldapauth">3.2.5</A>).</P><P>Note that <TT>ejabberd</TT> 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.</P><P>The <TT>mod_vcard_ldap</TT> 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 <TT>host</TT> option is not specified, the Jabber ID will be the
hostname of the virtual host with the prefix &#X2018;<TT>vjud.</TT>&#X2019;. The keyword "@HOST@"
is replaced at start time with the real virtual host name.
</DD><DT CLASS="dt-description"><B><TT>iqdisc</TT></B></DT><DD CLASS="dd-description"> This specifies
</DD><DT CLASS="dt-description"><B><TT>iqdisc</TT></B></DT><DD CLASS="dd-description"> This specifies
the processing discipline for <TT>vcard-temp</TT> IQ queries (see section&#XA0;<A HREF="#modiqdiscoption">3.3.2</A>).
</DD><DT CLASS="dt-description"><B><TT>search</TT></B></DT><DD CLASS="dd-description">This option specifies whether the search
functionality is enabled (value: <TT>true</TT>) or disabled (value:
@ -2874,14 +2877,14 @@ answers <TT>ejabberd</TT>&#X2019;s version when queried.</P><P>Options:
</P><DL CLASS="description"><DT CLASS="dt-description">
<B><TT>show_os</TT></B></DT><DD CLASS="dd-description">Should the operating system be revealed or not.
The default value is <TT>true</TT>.
</DD><DT CLASS="dt-description"><B><TT>iqdisc</TT></B></DT><DD CLASS="dd-description"> This specifies
</DD><DT CLASS="dt-description"><B><TT>iqdisc</TT></B></DT><DD CLASS="dd-description"> This specifies
the processing discipline for Software Version (<TT>jabber:iq:version</TT>) IQ queries (see section&#XA0;<A HREF="#modiqdiscoption">3.3.2</A>).
</DD></DL><P> <A NAME="manage"></A> </P><!--TOC chapter Managing an <TT>ejabberd</TT> server-->
<H1 CLASS="chapter"><!--SEC ANCHOR --><A NAME="htoc60">Chapter&#XA0;4</A>&#XA0;&#XA0;<A HREF="#manage">Managing an <TT>ejabberd</TT> server</A></H1><!--SEC END --><P> <A NAME="manage"></A> </P><P> <A NAME="ejabberdctl"></A> </P><!--TOC section <TT>ejabberdctl</TT>-->
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc61">4.1</A>&#XA0;&#XA0;<A HREF="#ejabberdctl"><TT>ejabberdctl</TT></A></H2><!--SEC END --><P> <A NAME="ejabberdctl"></A> </P><P> <A NAME="commands"></A> </P><!--TOC subsection Commands-->
<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc62">4.1.1</A>&#XA0;&#XA0;<A HREF="#commands">Commands</A></H3><!--SEC END --><P> <A NAME="commands"></A> </P><P>The <TT>ejabberdctl</TT> command line administration script allows to start, stop and perform
<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc62">4.1.1</A>&#XA0;&#XA0;<A HREF="#commands">Commands</A></H3><!--SEC END --><P> <A NAME="commands"></A> </P><P>The <TT>ejabberdctl</TT> command line administration script allows to start, stop and perform
many other administrative tasks in a local or remote <TT>ejabberd</TT> server.</P><P>When <TT>ejabberdctl</TT> is executed without any parameter,
it displays the available options. If there isn&#X2019;t an <TT>ejabberd</TT> server running,
it displays the available options. If there isn&#X2019;t an <TT>ejabberd</TT> server running,
the available parameters are:
</P><DL CLASS="description"><DT CLASS="dt-description">
<B><TT>start</TT></B></DT><DD CLASS="dd-description"> Start <TT>ejabberd</TT> in background mode. This is the default method.
@ -2896,7 +2899,7 @@ The more interesting ones are:
</DD><DT CLASS="dt-description"><B><TT>reopen-log</TT></B></DT><DD CLASS="dd-description"> If you use a tool to rotate logs, you have to configure it
so that this command is executed after each rotation.
</DD><DT CLASS="dt-description"><B><TT>backup, restore, install-fallback, dump, load</TT></B></DT><DD CLASS="dd-description"> You can use these
commands to create and restore backups.
commands to create and restore backups.
</DD><DT CLASS="dt-description"><B><TT>import-file, import-dir</TT></B></DT><DD CLASS="dd-description">
These options can be used to migrate from other Jabber/XMPP servers. There
exist tutorials to <A HREF="http://www.ejabberd.im/migrate-to-ejabberd">migrate from other software to ejabberd</A>.
@ -2915,66 +2918,66 @@ for example using: <TT>echo $?</TT></P><P> <A NAME="erlangconfiguration"></A> </
<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc63">4.1.2</A>&#XA0;&#XA0;<A HREF="#erlangconfiguration">Erlang runtime system</A></H3><!--SEC END --><P> <A NAME="erlangconfiguration"></A> </P><P><TT>ejabberd</TT> is an Erlang/OTP application that runs inside an Erlang runtime system.
This system is configured using environment variables and command line parameters.
The <TT>ejabberdctl</TT> administration script uses many of those possibilities.
You can configure some of them with the file <TT>ejabberdctl.cfg</TT>,
You can configure some of them with the file <TT>ejabberdctl.cfg</TT>,
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.</P><P>The environment variables:
</P><DL CLASS="description"><DT CLASS="dt-description">
<B><TT>EJABBERD_CONFIG_PATH</TT></B></DT><DD CLASS="dd-description">
<B><TT>EJABBERD_CONFIG_PATH</TT></B></DT><DD CLASS="dd-description">
Path to the ejabberd configuration file.
</DD><DT CLASS="dt-description"><B><TT>EJABBERD_MSGS_PATH</TT></B></DT><DD CLASS="dd-description">
</DD><DT CLASS="dt-description"><B><TT>EJABBERD_MSGS_PATH</TT></B></DT><DD CLASS="dd-description">
Path to the directory with translated strings.
</DD><DT CLASS="dt-description"><B><TT>EJABBERD_LOG_PATH</TT></B></DT><DD CLASS="dd-description">
</DD><DT CLASS="dt-description"><B><TT>EJABBERD_LOG_PATH</TT></B></DT><DD CLASS="dd-description">
Path to the ejabberd service log file.
</DD><DT CLASS="dt-description"><B><TT>EJABBERD_SO_PATH</TT></B></DT><DD CLASS="dd-description">
</DD><DT CLASS="dt-description"><B><TT>EJABBERD_SO_PATH</TT></B></DT><DD CLASS="dd-description">
Path to the directory with binary system libraries.
</DD><DT CLASS="dt-description"><B><TT>HOME</TT></B></DT><DD CLASS="dd-description">
</DD><DT CLASS="dt-description"><B><TT>HOME</TT></B></DT><DD CLASS="dd-description">
Path to the directory that is considered <TT>ejabberd</TT>&#X2019;s home.
This path is used to read the file <TT>.erlang.cookie</TT>.
</DD><DT CLASS="dt-description"><B><TT>ERL_CRASH_DUMP</TT></B></DT><DD CLASS="dd-description">
</DD><DT CLASS="dt-description"><B><TT>ERL_CRASH_DUMP</TT></B></DT><DD CLASS="dd-description">
Path to the file where crash reports will be dumped.
</DD><DT CLASS="dt-description"><B><TT>ERL_INETRC</TT></B></DT><DD CLASS="dd-description">
</DD><DT CLASS="dt-description"><B><TT>ERL_INETRC</TT></B></DT><DD CLASS="dd-description">
Indicates which IP name resolution to use.
If using <TT>-sname</TT>, specify either this option or <TT>-kernel inetrc filepath</TT>.
</DD><DT CLASS="dt-description"><B><TT>ERL_MAX_PORTS</TT></B></DT><DD CLASS="dd-description">
</DD><DT CLASS="dt-description"><B><TT>ERL_MAX_PORTS</TT></B></DT><DD CLASS="dd-description">
Maximum number of simultaneously open Erlang ports.
</DD><DT CLASS="dt-description"><B><TT>ERL_MAX_ETS_TABLES</TT></B></DT><DD CLASS="dd-description">
</DD><DT CLASS="dt-description"><B><TT>ERL_MAX_ETS_TABLES</TT></B></DT><DD CLASS="dd-description">
Maximum number of ETS and Mnesia tables.
</DD></DL><P>The command line parameters:
</P><DL CLASS="description"><DT CLASS="dt-description">
<B><TT>-sname ejabberd</TT></B></DT><DD CLASS="dd-description">
<B><TT>-sname ejabberd</TT></B></DT><DD CLASS="dd-description">
The Erlang node will be identified using only the first part
of the host name, i.&#XA0;e. other Erlang nodes outside this domain cannot contact
this node. This is the preferable option in most cases.
</DD><DT CLASS="dt-description"><B><TT>-name ejabberd</TT></B></DT><DD CLASS="dd-description">
</DD><DT CLASS="dt-description"><B><TT>-name ejabberd</TT></B></DT><DD CLASS="dd-description">
The Erlang node will be fully identified.
This is only useful if you plan to setup an <TT>ejabberd</TT> cluster with nodes in different networks.
</DD><DT CLASS="dt-description"><B><TT>-kernel inetrc "/etc/ejabberd/inetrc"</TT></B></DT><DD CLASS="dd-description">
Indicates which IP name resolution to use.
</DD><DT CLASS="dt-description"><B><TT>-kernel inetrc "/etc/ejabberd/inetrc"</TT></B></DT><DD CLASS="dd-description">
Indicates which IP name resolution to use.
If using <TT>-sname</TT>, specify either this option or <TT>ERL_INETRC</TT>.
</DD><DT CLASS="dt-description"><B><TT>-kernel inet_dist_listen_min 4200 inet_dist_listen_min 4210</TT></B></DT><DD CLASS="dd-description">
</DD><DT CLASS="dt-description"><B><TT>-kernel inet_dist_listen_min 4200 inet_dist_listen_min 4210</TT></B></DT><DD CLASS="dd-description">
Define the first and last ports that <TT>epmd</TT> (section <A HREF="#epmd">5.2</A>) can listen to.
</DD><DT CLASS="dt-description"><B><TT>-detached</TT></B></DT><DD CLASS="dd-description">
Starts the Erlang system detached from the system console.
Useful for running daemons and backgrounds processes.
</DD><DT CLASS="dt-description"><B><TT>-noinput</TT></B></DT><DD CLASS="dd-description">
</DD><DT CLASS="dt-description"><B><TT>-detached</TT></B></DT><DD CLASS="dd-description">
Starts the Erlang system detached from the system console.
Useful for running daemons and backgrounds processes.
</DD><DT CLASS="dt-description"><B><TT>-noinput</TT></B></DT><DD CLASS="dd-description">
Ensures that the Erlang system never tries to read any input.
Useful for running daemons and backgrounds processes.
</DD><DT CLASS="dt-description"><B><TT>-pa /var/lib/ejabberd/ebin</TT></B></DT><DD CLASS="dd-description">
Useful for running daemons and backgrounds processes.
</DD><DT CLASS="dt-description"><B><TT>-pa /var/lib/ejabberd/ebin</TT></B></DT><DD CLASS="dd-description">
Specify the directory where Erlang binary files (*.beam) are located.
</DD><DT CLASS="dt-description"><B><TT>-s ejabberd</TT></B></DT><DD CLASS="dd-description">
</DD><DT CLASS="dt-description"><B><TT>-s ejabberd</TT></B></DT><DD CLASS="dd-description">
Tell Erlang runtime system to start the <TT>ejabberd</TT> application.
</DD><DT CLASS="dt-description"><B><TT>-mnesia dir "/var/lib/ejabberd/"</TT></B></DT><DD CLASS="dd-description">
Specify the Mnesia database directory.
</DD><DT CLASS="dt-description"><B><TT>-sasl sasl_error_logger {file, "/var/log/ejabberd/sasl.log"}</TT></B></DT><DD CLASS="dd-description">
Path to the Erlang/OTP system log file.
</DD><DT CLASS="dt-description"><B><TT>+K [true|false]</TT></B></DT><DD CLASS="dd-description">
</DD><DT CLASS="dt-description"><B><TT>+K [true|false]</TT></B></DT><DD CLASS="dd-description">
Kernel polling.
</DD><DT CLASS="dt-description"><B><TT>-smp [auto|enable|disable]</TT></B></DT><DD CLASS="dd-description">
</DD><DT CLASS="dt-description"><B><TT>-smp [auto|enable|disable]</TT></B></DT><DD CLASS="dd-description">
SMP support.
</DD><DT CLASS="dt-description"><B><TT>+P 250000</TT></B></DT><DD CLASS="dd-description">
</DD><DT CLASS="dt-description"><B><TT>+P 250000</TT></B></DT><DD CLASS="dd-description">
Maximum number of Erlang processes.
</DD><DT CLASS="dt-description"><B><TT>-remsh ejabberd@localhost</TT></B></DT><DD CLASS="dd-description">
</DD><DT CLASS="dt-description"><B><TT>-remsh ejabberd@localhost</TT></B></DT><DD CLASS="dd-description">
Open an Erlang shell in a remote Erlang node.
</DD></DL><P>
Note that some characters need to be escaped when used in shell scripts, for instance <CODE>"</CODE> and <CODE>{}</CODE>.
@ -2982,7 +2985,7 @@ You can find other options in the Erlang manual page (<TT>erl -man erl</TT>).</P
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc64">4.2</A>&#XA0;&#XA0;<A HREF="#webadmin">Web Admin</A></H2><!--SEC END --><P> <A NAME="webadmin"></A>
</P><P>The <TT>ejabberd</TT> Web Admin allows to administer most of <TT>ejabberd</TT> using a web browser.</P><P>This feature is enabled by default:
a <TT>ejabberd_http</TT> listener with the option <TT>web_admin</TT> (see
section&#XA0;<A HREF="#listened">3.1.3</A>) is included in the listening ports. Then you can open
section&#XA0;<A HREF="#listened">3.1.3</A>) is included in the listening ports. Then you can open
<CODE>http://server:port/admin/</CODE> in your favourite web browser. You
will be asked to enter the username (the <EM>full</EM> Jabber ID) and password
of an <TT>ejabberd</TT> user with administrator rights. After authentication
@ -3045,7 +3048,7 @@ with a Jabber client.
The client must support Ad-Hoc Commands (<A HREF="http://www.xmpp.org/extensions/xep-0050.html">XEP-0050</A>),
and you must login in the Jabber server with
an account with proper privileges.</P><P> <A NAME="changeerlangnodename"></A> </P><!--TOC section Change Computer Hostname-->
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc66">4.4</A>&#XA0;&#XA0;<A HREF="#changeerlangnodename">Change Computer Hostname</A></H2><!--SEC END --><P> <A NAME="changeerlangnodename"></A> </P><P><TT>ejabberd</TT> uses the distributed Mnesia database.
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc66">4.4</A>&#XA0;&#XA0;<A HREF="#changeerlangnodename">Change Computer Hostname</A></H2><!--SEC END --><P> <A NAME="changeerlangnodename"></A> </P><P><TT>ejabberd</TT> 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 <A HREF="#nodename">5.4</A>).
The name of an Erlang node includes the hostname of the computer.
@ -3055,7 +3058,7 @@ or when you move <TT>ejabberd</TT> to a different machine.</P><P>So, if you want
you must follow these instructions:
</P><OL CLASS="enumerate" type=1><LI CLASS="li-enumerate">
In the old server, backup the Mnesia database using the Web Admin or <TT>ejabberdctl</TT>.
For example:
For example:
<PRE CLASS="verbatim">ejabberdctl backup /tmp/ejabberd-oldhost.backup
</PRE> </LI><LI CLASS="li-enumerate">In the new server, restore the backup file using the Web Admin or <TT>ejabberdctl</TT>.
For example:
@ -3074,13 +3077,13 @@ you must follow these instructions:
</TABLE>
<DIV CLASS="center"><HR WIDTH="80%" SIZE=2></DIV></DIV></BLOCKQUOTE><P> <A NAME="epmd"></A> </P><!--TOC section epmd-->
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc69">5.2</A>&#XA0;&#XA0;<A HREF="#epmd">epmd</A></H2><!--SEC END --><P> <A NAME="epmd"></A> </P><P><A HREF="http://www.erlang.org/doc/man/epmd.html">epmd (Erlang Port Mapper Daemon)</A>
is a small name server included in Erlang/OTP
and used by Erlang programs when establishing distributed Erlang communications.
<TT>ejabberd</TT> needs <TT>epmd</TT> to use <TT>ejabberdctl</TT> and also when clustering <TT>ejabberd</TT> nodes.
is a small name server included in Erlang/OTP
and used by Erlang programs when establishing distributed Erlang communications.
<TT>ejabberd</TT> needs <TT>epmd</TT> to use <TT>ejabberdctl</TT> and also when clustering <TT>ejabberd</TT> nodes.
This small program is automatically started by Erlang, and is never stopped.
If <TT>ejabberd</TT> is stopped, and there aren&#X2019;t any other Erlang programs
running in the system, you can safely stop <TT>epmd</TT> if you want.</P><P><TT>ejabberd</TT> runs inside an Erlang node.
To communicate with <TT>ejabberd</TT>, the script <TT>ejabberdctl</TT> starts a new Erlang node
If <TT>ejabberd</TT> is stopped, and there aren&#X2019;t any other Erlang programs
running in the system, you can safely stop <TT>epmd</TT> if you want.</P><P><TT>ejabberd</TT> runs inside an Erlang node.
To communicate with <TT>ejabberd</TT>, the script <TT>ejabberdctl</TT> starts a new Erlang node
and connects to the Erlang node that holds <TT>ejabberd</TT>.
In order for this communication to work,
<TT>epmd</TT> 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 <TT>ejabberd</TT> nodes
you must open the port 4369 for the machines involved in the cluster.
Remember to block the port so Internet doesn&#X2019;t have access to it.</P><P>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 <TT>ejabberdctl.cfg</TT>.
The Erlang command-line parameter used internally is, for example:
</P><PRE CLASS="verbatim">erl ... -kernel inet_dist_listen_min 4370 inet_dist_listen_max 4375
</PRE><P> <A NAME="cookie"></A> </P><!--TOC section Erlang Cookie-->
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc70">5.3</A>&#XA0;&#XA0;<A HREF="#cookie">Erlang Cookie</A></H2><!--SEC END --><P> <A NAME="cookie"></A> </P><P>The Erlang cookie is a string with numbers and letters.
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc70">5.3</A>&#XA0;&#XA0;<A HREF="#cookie">Erlang Cookie</A></H2><!--SEC END --><P> <A NAME="cookie"></A> </P><P>The Erlang cookie is a string with numbers and letters.
An Erlang node reads the cookie at startup from the command-line parameter <TT>-setcookie</TT>.
If not indicated, the cookie is read from the cookie file <TT>$HOME/.erlang.cookie</TT>.
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.</P><P>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.</P><P>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.</P><P> <A NAME="nodename"></A> </P><!--TOC section Erlang node name-->
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc71">5.4</A>&#XA0;&#XA0;<A HREF="#nodename">Erlang node name</A></H2><!--SEC END --><P> <A NAME="nodename"></A> </P><P>An Erlang node may have a node name.
The name can be short (if indicated with the command-line parameter <TT>-sname</TT>)
or long (if indicated with the parameter <TT>-name</TT>).
Starting an Erlang node with -sname limits the communication between Erlang nodes to the LAN.</P><P>Using the option <TT>-sname</TT> instead of <TT>-name</TT> is a simple method
The name can be short (if indicated with the command-line parameter <TT>-sname</TT>)
or long (if indicated with the parameter <TT>-name</TT>).
Starting an Erlang node with -sname limits the communication between Erlang nodes to the LAN.</P><P>Using the option <TT>-sname</TT> instead of <TT>-name</TT> 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 <TT>epmd</TT>.
The recommended way to secure the Erlang node is to block the port 4369.</P><P> <A NAME="secure-files"></A> </P><!--TOC section Securing sensible files-->
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc72">5.5</A>&#XA0;&#XA0;<A HREF="#secure-files">Securing sensible files</A></H2><!--SEC END --><P> <A NAME="secure-files"></A> </P><P><TT>ejabberd</TT> stores sensible data in the file system either in plain text or binary files.
@ -3221,7 +3224,7 @@ domain.</P><P> <A NAME="servicelb"></A> </P><!--TOC section Service Load-Balanci
</P><P> <A NAME="componentlb"></A> </P><!--TOC subsection Components Load-Balancing-->
<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc81">6.3.1</A>&#XA0;&#XA0;<A HREF="#componentlb">Components Load-Balancing</A></H3><!--SEC END --><P> <A NAME="componentlb"></A> </P><P> <A NAME="domainlb"></A> </P><!--TOC subsection Domain Load-Balancing Algorithm-->
<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc82">6.3.2</A>&#XA0;&#XA0;<A HREF="#domainlb">Domain Load-Balancing Algorithm</A></H3><!--SEC END --><P> <A NAME="domainlb"></A>
</P><P><TT>ejabberd</TT> includes an algorithm to load balance the components that are plugged on an <TT>ejabberd</TT> cluster. It means that you can plug one or several instances of the same component on each <TT>ejabberd</TT> cluster and that the traffic will be automatically distributed.</P><P>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.</P><P>If you need a different behaviour, you can change the load balancing behaviour with the option <TT>domain_balancing</TT>. The syntax of the option is the following:</P><PRE CLASS="verbatim">{domain_balancing, "component.example.com", &lt;balancing_criterium&gt;}.
</P><P><TT>ejabberd</TT> includes an algorithm to load balance the components that are plugged on an <TT>ejabberd</TT> cluster. It means that you can plug one or several instances of the same component on each <TT>ejabberd</TT> cluster and that the traffic will be automatically distributed.</P><P>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.</P><P>If you need a different behaviour, you can change the load balancing behaviour with the option <TT>domain_balancing</TT>. The syntax of the option is the following:</P><PRE CLASS="verbatim">{domain_balancing, "component.example.com", &lt;balancing_criterium&gt;}.
</PRE><P>Several balancing criteria are available:
</P><UL CLASS="itemize"><LI CLASS="li-itemize">
<TT>destination</TT>: the full JID of the packet <TT>to</TT> attribute is used.
@ -3267,12 +3270,12 @@ For example, the default configuration is:
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc87">7.3</A>&#XA0;&#XA0;<A HREF="#debugconsole">Debug Console</A></H2><!--SEC END --><P> <A NAME="debugconsole"></A> </P><P>The Debug Console is an Erlang shell attached to an already running <TT>ejabberd</TT> server.
With this Erlang shell, an experienced administrator can perform complex tasks.</P><P>This shell gives complete control over the <TT>ejabberd</TT> 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
<A HREF="http://www.ejabberd.im/interconnect-erl-nodes">Interconnecting Erlang Nodes</A></P><P>To exit the shell, close the window or press the keys: control+c control+c.</P><P> <A NAME="i18ni10n"></A> </P><!--TOC chapter Internationalization and Localization-->
<H1 CLASS="chapter"><!--SEC ANCHOR --><A NAME="htoc88">Appendix&#XA0;A</A>&#XA0;&#XA0;<A HREF="#i18ni10n">Internationalization and Localization</A></H1><!--SEC END --><P> <A NAME="i18ni10n"></A>
</P><P>The source code of <TT>ejabberd</TT> supports localization.
The translators can edit the
<A HREF="http://www.gnu.org/software/gettext/">gettext</A> .po files
The translators can edit the
<A HREF="http://www.gnu.org/software/gettext/">gettext</A> .po files
using any capable program (KBabel, Lokalize, Poedit...) or a simple text editor.</P><P>Then gettext
is used to extract, update and export those .po files to the .msg format read by <TT>ejabberd</TT>.
To perform those management tasks, in the <TT>src/</TT> directory execute <TT>make translations</TT>.
@ -3299,7 +3302,7 @@ Figure&#XA0;<A HREF="#fig:discorus">A.1</A>, for example, shows the reply to the
<IMG SRC="webadmmainru.png" ALT="webadmmainru.png">
<DIV CLASS="caption"><TABLE CELLSPACING=6 CELLPADDING=0><TR><TD VALIGN=top ALIGN=left>Figure A.2: Web Admin showing a virtual host when the web browser provides the
<DIV CLASS="caption"><TABLE CELLSPACING=6 CELLPADDING=0><TR><TD VALIGN=top ALIGN=left>Figure A.2: Web Admin showing a virtual host when the web browser provides the
HTTP header &#X2018;Accept-Language: ru&#X2019;</TD></TR>
</TABLE></DIV>
<A NAME="fig:webadmmainru"></A>