25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00
Go to file
Andreas Köhler 1ab92d1159 Bind listener ports early and start accepting connections later
(EJAB-1334)

It may happen that auth or rdbms client tcp connections bind a local
socket to a port number required by a configered listener. The ejabberd
applications fails to start up and needs to be restarted.

In plain C you would bind(2) the listener port and listen(2) later on.
gen_tcp:listen/2 does not allow to separate these two steps though, so
another way is not to accept connections while start up. OTOH, the
kernel will syn/ack incoming connections and receive data, leaving them
in a buffer for the ejabberd to read from. If this is unwanted, a load
balancer would need to receive data from the ejabberd server before
adding the node to its pool.

This patch binds tcp ports while initializing the ejabberd_listener
process, storing ListenSockets in an ets table. start_listeners/0 will
reuse these ports later on.
2010-11-10 23:45:24 +01:00
contrib Move the extract_translations code to the tools dir (EJAB-1311) 2010-09-27 13:39:15 +02:00
doc New ip_access option restricts which IPs can register (thanks to Alexey Shchepin)(EJAB-915) 2010-11-05 19:33:20 +01:00
src Bind listener ports early and start accepting connections later 2010-11-10 23:45:24 +01:00
tools Move the extract_translations code to the tools dir (EJAB-1311) 2010-09-27 13:39:15 +02:00
.gitignore Rename aclocal.m4 to acinclude.m4 (thanks to Andreas Köhler) 2010-10-15 16:24:17 +02:00
COPYING * src/msgs/nl.msg: Updated (thanks to Sander Devrieze) 2004-10-09 20:15:49 +00:00
README Rename aclocal.m4 to acinclude.m4 (thanks to Andreas Köhler) 2010-10-15 16:24:17 +02:00

ejabberd - High-Performance Enterprise Instant Messaging Server 

Quickstart guide


0. Requirements

To compile ejabberd you need:
 - GNU Make
 - GCC
 - Erlang/OTP R12B-5 or higher.
 - exmpp 0.9.6 or higher
 - OpenSSL 0.9.8 or higher, for STARTTLS, SASL and SSL encryption.
 - Zlib 1.2.3 or higher, for Stream Compression support
   (XEP-0138). Optional.
 - Erlang mysql library. Optional. MySQL authentication/storage.
 - Erlang pgsql library. Optional. PostgreSQL authentication/storage.
 - PAM library. Optional. For Pluggable Authentication Modules (PAM).
 - ESASL library. Optional. For SASL GSSAPI authentication.
 - ImageMagick's Convert program. Optional. For CAPTCHA challenges.


1. Compile and install on *nix systems

To compile ejabberd, go to the directory src/ and execute the commands:
  ./configure
  make

If you get an error like:
  ./configure: No such file or directory
the solution is to first execute:
  aclocal
  autoconf

To install ejabberd, run this command with system administrator rights
(root user):

  sudo make install

These commands will:
 - Install the configuration files in /etc/ejabberd/
 - Install ejabberd binary, header and runtime files in /lib/ejabberd/
 - Install the administration script: /sbin/ejabberdctl
 - Install ejabberd documentation in /share/doc/ejabberd/
 - Create a spool directory: /var/lib/ejabberd/
 - Create a directory for log files: /var/log/ejabberd/


2. Start ejabberd

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


For detailed information please refer to the
ejabberd Installation and Operation Guide