File: COMPILE.md

package info (click to toggle)
ejabberd 24.12-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,740 kB
  • sloc: erlang: 111,927; sh: 4,004; sql: 3,551; perl: 832; makefile: 542; python: 48; javascript: 34
file content (122 lines) | stat: -rw-r--r-- 2,977 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
Compile and Install ejabberd
============================

This document explains how to compile and install ejabberd
from source code.

For a more detailed explanation, please check the
ejabberd Docs: [Source Code Installation][docs-source].

[docs-source]: https://docs.ejabberd.im/admin/install/source/


Requirements
------------

To compile ejabberd you need:

- GNU Make
- GCC
- Libexpat ≥ 1.95
- Libyaml ≥ 0.1.4
- Erlang/OTP ≥ 20.0
- OpenSSL ≥ 1.0.0

Other optional libraries are:

- Zlib ≥ 1.2.3, for Stream Compression support (XEP-0138)
- PAM library, for Pluggable Authentication Modules (PAM)
- ImageMagick's Convert program and Ghostscript fonts, for CAPTCHA
  challenges
- Elixir ≥ 1.10.3, for Elixir support. It is recommended Elixir 1.13.4 or higher
  and Erlang/OTP 23.0 or higher.

If your system splits packages in libraries and development headers,
install the development packages too.


Download Source Code
--------------------

There are several ways to obtain the ejabberd source code:

- Source code archive from [ProcessOne Downloads][p1dl]
- Source code package from [ejabberd GitHub Releases][ghr]
- Latest development code from [ejabberd Git repository][gitrepo]

[p1dl]: https://www.process-one.net/download/ejabberd/
[ghr]: https://github.com/processone/ejabberd/releases
[gitrepo]: https://github.com/processone/ejabberd


Compile
-------

The general instructions to compile ejabberd are:

    ./configure
    make

If the source code doesn't contain a `configure` script,
first of all install `autoconf` and run this to generate it:

    ./autogen.sh

To configure the compilation, features, install paths...

    ./configure --help


Install in the System
---------------------

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

    sudo make install

This 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/`


Build an OTP Release
--------------------

Instead of installing ejabberd in the system, you can build an OTP release
that includes all necessary to run ejabberd in a subdirectory:

    ./configure
    make prod

Check the full list of targets:

    make help


Start ejabberd
--------------

You can use the `ejabberdctl` command line administration script to
start and stop ejabberd. Some examples, depending on your installation method:

- When installed in the system:
  ```
  ejabberdctl start
  /sbin/ejabberdctl start
  ```

- When built an OTP production release:
  ```
  _build/prod/rel/ejabberd/bin/ejabberdctl start
  _build/prod/rel/ejabberd/bin/ejabberdctl live
  ```

- Start interactively without installing or building OTP release:
  ```
  make relive
  ```