Install ejabberd

In the Tutorials page there are links to other tutorials about installing and configuring ejabberd.
  1. Install Erlang

    • from source

      1. Install Libncurses development files

        • with Debian APT

          apt-get install libncurses5-dev
      2. Install OpenSSL and its development files

        • with Debian APT

          apt-get install openssl libssl-dev
      3. Install Erlang

        Download Erlang/OTP source code and uncompress it. For example:

        wget http://www.erlang.org/download/otp_src_R11B-5.tar.gz
        tar -xzvf otp_src_R11B-5.tar.gz
        cd otp_src_R11B-5
        LANG=C; export LANG

        Compile and install it:

        ./configure
        make
        make install
    • with Debian APT

      apt-get install erlang
    • using Port Collection on FreeBSD

      cd /usr/ports/lang/erlang-lite && make all install clean
  2. Verify Installation

    Check if it is correctly installed:

    erl
    Erlang (BEAM) emulator version 5.5.5 [source] [hipe]
    
    
    Eshell V5.5.5  (abort with ^G)
    1> halt().
  3. Install ejabberd

    • from source SVN

      1. Install Libexpatl development files

        • with Debian APT

          apt-get install libexpat1-dev
      2. Retrieve ejabberd from the Subversion repository

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

        cd ejabberd/src
        ./configure
        make
      4. Configure

        You can use the example configuration file:

        cp ejabberd.cfg.example ejabberd.cfg

        You should add a user to your system:

        addgroup jabber
        adduser ejabberd
        adduser ejabberd jabber
        chown ejabberd:jabber ../src -R
        chmod 750 ../src -R
      5. Execute

        Command to execute ejabberd:

        su ejabberd -c "erl -s ejabberd -name ejabberd 
                                       -ejabberd config '\"ejabberd.cfg\"' -detached"

        You can use a script.

    • using apt on Debian unstable and testing

      It is as easy as:

      apt-get install ejabberd
    • using apt on Debian stable

      Add Teopetuk's unofficial Debian APT repository if you do not have it. Then update the list of available packages and finally install it:

      apt-get install ejabberd
    • using Port Collection on FreeBSD

      cd /usr/ports/net-im/ejabberd && make all install clean
  4. Enable SSL/TLS Secured Communication

    Create a SSL key (read this tutorial for more information):

    openssl req -new -x509 -newkey rsa:1024 -days 3650 -keyout privkey.pem -out server.pem
    openssl rsa -in privkey.pem -out privkey.pem
    cat privkey.pem >> server.pem
    rm privkey.pem

    Now edit your ejabberd.cfg file and specify the correct location of your server.pem:

    {listen, [{5222, ejabberd_c2s,     [{access, c2s}, {shaper, c2s_shaper},
                                        starttls, {certfile, "/home/ejabberd/server.pem"}]},
              {5223, ejabberd_c2s,     [{access, c2s}, {shaper, c2s_shaper},
                                        tls, {certfile, "/home/ejabberd/server.pem"}]},
              ...
    ]}.
    
    {s2s_use_starttls, true}.
    {s2s_certfile, "/home/ejabberd/server.pem"}.
    

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

FreeBSD - Erlang

The FreeBSD erlang-lite is depreciated in the new ports (using 10.2 myself) as it used the same options as the standard erlang port, so use the following line

cd /usr/ports/lang/erlang && make all install clean

git repository

Is this git repository official http://github.com/processone/ejabberd/ ?

It seems fresh enough.

Yes, it is

Quote:

Is this git repository official http://github.com/processone/ejabberd/ ?

It seems fresh enough.

Yes, and it is updated automatically (every 5 minutes or so) from the same machine that hosts the main ejabberd SVN repository.

Thanks!

This is a good resource. Can you point me to any directions as to how to add AD authentication support?

Isn't AD LDAP

Isn't AD LDAP compatible?

--
sander

certificate format problem

I'm having trouble getting certs I'm generating to work. I came here looking for resources to learn to fix the problem, and I noticed that your tutorial link doesn't work. http://jabberd.jabberstudio.org/2/docs/app_sslkey.html

Can someone please point me to a resource to fix my problem? Everything works fine except TLS, and whether I install from binary or source doesn't matter, as soon as I set ejabberd.cfg for my cert file, it starts complaining. Output from the log is

** Reason for termination =
** {{badmatch,{error,"SSL_CTX_use_PrivateKey_file failed: error:0906D06C:PEM routines:PEM_read_bio:no start line"}},
[{ejabberd_socket,starttls,3},
{ejabberd_c2s,wait_for_feature_request,2},
{p1_fsm,handle_msg,10},
{proc_lib,init_p,5}]}

I'm reasonably sure it is a certificate format problem, but I've tried every method I can think of, and have generated 2 different certificates as a test (registered SSL not self signed). In fact, I just went to Startssl.net and got the XMPP format cert.

Thanks for any help or links!

There are two links in

There are two links in Tutorials about xmpp.net cert installation. They may give you some hint about how to install your cert.

Syndicate content