Show last authors
1 {{box cssClass="floatinginfobox" title="**Contents**"}}
2 {{toc/}}
3 {{/box}}
4
5 = Requirements =
6
7 Operating system : CentOS, Debian, Ubuntu.
8
9 The hardware should be chosen according to the workload you want to be able to sustain. Although flexisip is not quite CPU intensive (unless you are transcoding), you should make sure that your machine has enough RAM.
10 Up to about 10000 connections, you should be OK with 8 GB of RAM.
11
12 = Installation from our repositories =
13
14 == Supported distributions ==
15
16 (% style="margin-left:auto; margin-right:auto" %)
17 |=(% scope="row" %) |=(% style="text-align: center;" %)CentOS 7|=(% style="text-align: center;" %)CentOS 8|=(% style="text-align: center;" %)Debian 8 (Jessie)|=(% style="text-align: center;" %)Debian 9 (Stretch)|=(% style="text-align: center;" %)Debian 10 (Buster)|=(% style="text-align: center;" %)Ubuntu 18.04 LTS (Bionic Beaver)
18 |=Flexisip 2.0|(% style="text-align:center" %)✓|(% style="text-align:center" %) |(% style="text-align:center" %)✓|(% style="text-align:center" %)✓|(% style="text-align:center" %) |(% style="text-align:center" %)✓
19 |=Flexisip 2.1 (beta)|(% style="text-align:center" %)✓|(% style="text-align:center" %)✓|(% style="text-align:center" %) |(% style="text-align:center" %)✓|(% style="text-align:center" %)✓|(% style="text-align:center" %)✓
20 |=Flexisip 2.2 (alpha)|(% style="text-align:center" %) |(% style="text-align:center" %)✓|(% style="text-align:center" %) |(% style="text-align:center" %)✓|(% style="text-align:center" %)✓|(% style="text-align:center" %)✓
21
22 == Centos ==
23
24 ~1. Install “Extra Packages for Enterprise Linux (EPEL)” repository ; it is used for some Flexisip dependencies like Hiredis library.
25
26 {{code}}
27 yum -y install epel-release
28 {{/code}}
29
30 2. Add Belledonne Communications' repository by creating **/etc/yum.repos.d/BelledonneCom.repo** with following content:
31
32 {{code language="ini"}}
33 # keep this repository enabled even if you enable beta/alpha repositories
34 [Belledonne-stable]
35 name=Belledonne-stable
36 baseurl=http://www.linphone.org/snapshots/centos/$releasever/stable
37 enabled=1
38 gpgcheck=0
39
40 # enable this if you want post-release patches
41 [Belledonne-hotfix]
42 name=Belledonne-hotfix
43 baseurl=http://www.linphone.org/snapshots/centos/$releasever/hotfix
44 enabled=0
45 gpgcheck=0
46
47 # enable this if you want next release beta packages
48 [Belledonne-beta]
49 name=Belledonne-beta
50 baseurl=http://www.linphone.org/snapshots/centos/$releasever/beta
51 enabled=0
52 gpgcheck=0
53
54 # enable this to have development (unstable) packages
55 [Belledonne-alpha]
56 name=Belledonne-alpha
57 baseurl=http://www.linphone.org/snapshots/centos/$releasever/alpha
58 enabled=0
59 gpgcheck=0
60 {{/code}}
61
62 3. Perform the actual installation:
63
64 {{code}}
65 yum install bc-flexisip
66 {{/code}}
67
68 The installation is completed. You can directly go to [[Post-installation instructions>>doc:||anchor="HPost-installationinstructions"]] section.
69
70 == Debian/Ubuntu ==
71
72 (% id="HCreatetheBelledonneCommunicationsAPTrepoin2Fetc2Fapt2Fsources.list.d2Fbelledonne.list2A" %)
73 ~1. Create the Belledonne Communications APT repo in **/etc/apt/sources.list.d/belledonne.list**.
74
75 {{code}}
76 # For Debian 8
77 deb [arch=amd64] http://linphone.org/snapshots/debian jessie stable # hotfix beta alpha
78
79 # For Debian 9
80 deb [arch=amd64] http://linphone.org/snapshots/debian stretch stable # hotfix beta alpha
81
82 # For Debian 10
83 deb [arch=amd64] http://linphone.org/snapshots/debian buster stable # hotfix beta alpha
84
85 # For Ubuntu 18.04 LTS
86 deb [arch=amd64] http://linphone.org/snapshots/ubuntu bionic stable # hotfix beta alpha
87 {{/code}}
88
89 You may uncomment 'beta' and/or 'alpha' branches if you need access to pre-release and/or development packages, but keep in mind that **stable branch must always be enabled** because some external dependencies of Flexisip are provided by this.
90
91 (% id="HInstallthebelledonnecommunicationgpgkeyusedtosignthedebs" %)
92 2. Install Belledonne Communications' PGP key for package sign checking
93
94 {{code language="bash"}}
95 # For Debian
96 wget https://linphone.org/snapshots/debian/keyring.gpg -O - | sudo apt-key add -
97
98 # For Ubuntu
99 wget https://www.linphone.org/snapshots/ubuntu/pubkey.gpg -O - | sudo apt-key add -
100 {{/code}}
101
102 3. Install development packages for SQL backend (example below for Mariadb, classic use case)
103
104 **/!\ **Not doing this can result in the following error : "[SOCI] connection pool open error: Failed to find shared library for backend mysql"
105
106 {{code}}
107 apt install libmariadb-dev
108 {{/code}}
109
110 (% id="HUpdateaptitudeandinstallflexisipandit27sdependencies" %)
111 4. Update APT cache and install Flexisip and its dependencies
112
113 {{code}}
114 apt update
115 apt install bc-flexisip
116 {{/code}}
117
118
119 The installation is completed. You can directly go to [[Post-installation instructions>>path:#HPost-installationinstructions]] section.
120
121 = Installation from sources using git =
122
123 The source code of Flexisip is available on our GitLab instance [[here>>https://gitlab.linphone.org/BC/public/flexisip]].
124
125 ~1. Fetch the source code by cloning the repository recursively:
126
127 {{code}}
128 git clone https://gitlab.linphone.org/BC/public/flexisip --recursive -b <branch_name>
129 {{/code}}
130
131 Replace //<branch_name>// by one of the following:
132
133 * A release tag name if you want a specific release (e.g. "2.0.0").
134 * A release branch name if you want a specific release plus all post release fixes (e.g. "release/2.0")
135 * "master" if you want the development version.
136
137 2. Follow instructions in README.md file at the root of the project.
138
139 = Post-installation instructions =
140
141 == Generate the configuration file ==
142
143 Make Flexisip to generate its default configuration file:
144
145 {{code language="bash"}}
146 # as root
147 /opt/belledonne-communications/bin/flexisip --dump-default all > /etc/flexisip/flexisip.conf
148 {{/code}}
149
150 This generated file contains all the available settings with their respective documentation.
151
152 By default, Flexisip behaves as a simple forwarding proxy. See [[Configuration>>Configuration]] chapter for more information about how to customize it.
153
154 == Starting the needed services ==
155
156 Flexisip's executable is installed in **/opt/belledonne-communications/bin/flexisip** . Running it without any argument will make Flexisip to behave as a SIP proxy, but ti can provide other kind of services. This can be chosen by using **~-~-server** command-line argument, which takes three values :
157
158 * proxy : launch Flexisip as a SIP proxy (default behaviour).
159 * presence : launch Flexisip as a [[presence server>>doc:Flexisip.C\. Features.Presence server.WebHome]].
160 * conference : launch Flexisip as a conference server (group chat).
161
162 Flexisip is also furnished with several SystemD scripts in order to be run as system daemon. There is one Systemd service for each kind of server. For instance, the following command will run the proxy and the presence server:
163
164 {{code language="bash"}}
165 systemctl start flexisip-proxy flexisip-presence
166 {{/code}}
167
168 By default, Flexisip isn't scheduled for starting on system boot. You may do so by calling:
169
170 {{code language="bash"}}
171 # Make the proxy and presence servers to start on system boot
172 systemctl enable flexisip-proxy flexisip-presence
173 {{/code}}
174
175 The three services (proxy, presence, conference) run in their own process. They can be together running on the same machine or spread on several hosts.
176
177 == Firewall configuration ==
178
179 On a fresh RedHat or CentOS installation, **the firewall is turned ON by default, with almost all ports forbidden. Flexisip won't be able to operate at all under these conditions**.
180
181 Simply turning off the firewall will allow full operation:
182
183 {{code language="sh"}}
184 sudo systemctl stop firewalld
185 {{/code}}
186
187 however your system administrator may not like this approach, and will prefer enabling selective ports. A Flexisip server will generally need:
188
189 * the TCP ports for SIP/SIPS: these are the ports mentionned in the[[ transports definition of global section>>doc:Flexisip.A\. Configuration Reference Guide.master.global]] of flexisip.conf ;
190 * the 3478 UDP port for the builtin STUN server that helps clients to use ICE for efficient media stream transmissions ;
191 * the media relay UDP ports, for the media relay service of Flexisip, which uses randomly selected ports in a [[configurable range>>doc:Flexisip.A\. Configuration Reference Guide.master.module.MediaRelay]].