Hide last authors
SandrineAvakian 1.1 1 {{box cssClass="floatinginfobox" title="**Contents**"}}
François Grisez 52.1 2 {{toc/}}
SandrineAvakian 1.1 3 {{/box}}
4
François Grisez 22.1 5 = Requirements =
SandrineAvakian 1.1 6
François Grisez 27.1 7 Operating system : CentOS, Debian, Ubuntu.
SandrineAvakian 1.1 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
François Grisez 26.1 12 = Installation from our repositories =
SandrineAvakian 1.1 13
François Grisez 59.1 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" %)✓
François Grisez 60.1 19 |=Flexisip 2.1|(% style="text-align:center" %)✓|(% style="text-align:center" %)✓|(% style="text-align:center" %) |(% style="text-align:center" %)✓|(% style="text-align:center" %)✓|(% style="text-align:center" %)✓
François Grisez 61.1 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" %)✓
François Grisez 59.1 21
François Grisez 26.1 22 == Centos ==
23
François Grisez 21.1 24 ~1. Install “Extra Packages for Enterprise Linux (EPEL)” repository ; it is used for some Flexisip dependencies like Hiredis library.
SandrineAvakian 1.1 25
GhislainMary 13.1 26 {{code}}
27 yum -y install epel-release
28 {{/code}}
SandrineAvakian 1.1 29
François Grisez 21.1 30 2. Add Belledonne Communications' repository by creating **/etc/yum.repos.d/BelledonneCom.repo** with following content:
SandrineAvakian 1.1 31
François Grisez 23.1 32 {{code language="ini"}}
33 # keep this repository enabled even if you enable beta/alpha repositories
François Grisez 17.1 34 [Belledonne-stable]
35 name=Belledonne-stable
36 baseurl=http://www.linphone.org/snapshots/centos/$releasever/stable
François Grisez 23.1 37 enabled=1
SandrineAvakian 1.1 38 gpgcheck=0
François Grisez 17.1 39
François Grisez 53.1 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
François Grisez 56.1 44 enabled=0
François Grisez 53.1 45 gpgcheck=0
46
47 # enable this if you want next release beta packages
François Grisez 17.1 48 [Belledonne-beta]
49 name=Belledonne-beta
50 baseurl=http://www.linphone.org/snapshots/centos/$releasever/beta
François Grisez 23.1 51 enabled=0
François Grisez 17.1 52 gpgcheck=0
53
François Grisez 23.1 54 # enable this to have development (unstable) packages
François Grisez 17.1 55 [Belledonne-alpha]
56 name=Belledonne-alpha
57 baseurl=http://www.linphone.org/snapshots/centos/$releasever/alpha
François Grisez 23.1 58 enabled=0
François Grisez 17.1 59 gpgcheck=0
SandrineAvakian 1.1 60 {{/code}}
61
François Grisez 21.1 62 3. Perform the actual installation:
SandrineAvakian 1.1 63
François Grisez 16.1 64 {{code}}
François Grisez 18.1 65 yum install bc-flexisip
François Grisez 16.1 66 {{/code}}
67
François Grisez 35.1 68 The installation is completed. You can directly go to [[Post-installation instructions>>doc:||anchor="HPost-installationinstructions"]] section.
François Grisez 34.1 69
François Grisez 43.2 70 == Debian/Ubuntu ==
SandrineAvakian 1.1 71
François Grisez 20.1 72 (% id="HCreatetheBelledonneCommunicationsAPTrepoin2Fetc2Fapt2Fsources.list.d2Fbelledonne.list2A" %)
François Grisez 48.1 73 ~1. Create the Belledonne Communications APT repo in **/etc/apt/sources.list.d/belledonne.list**.
SandrineAvakian 1.1 74
75 {{code}}
François Grisez 44.1 76 # For Debian 8
François Grisez 54.1 77 deb [arch=amd64] http://linphone.org/snapshots/debian jessie stable # hotfix beta alpha
SandrineAvakian 1.1 78
François Grisez 44.1 79 # For Debian 9
François Grisez 54.1 80 deb [arch=amd64] http://linphone.org/snapshots/debian stretch stable # hotfix beta alpha
François Grisez 19.1 81
François Grisez 59.1 82 # For Debian 10
83 deb [arch=amd64] http://linphone.org/snapshots/debian buster stable # hotfix beta alpha
84
François Grisez 44.1 85 # For Ubuntu 18.04 LTS
François Grisez 54.1 86 deb [arch=amd64] http://linphone.org/snapshots/ubuntu bionic stable # hotfix beta alpha
SandrineAvakian 1.1 87 {{/code}}
88
François Grisez 48.1 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.
François Grisez 44.1 90
François Grisez 20.1 91 (% id="HInstallthebelledonnecommunicationgpgkeyusedtosignthedebs" %)
92 2. Install Belledonne Communications' PGP key for package sign checking
SandrineAvakian 1.1 93
François Grisez 44.1 94 {{code language="bash"}}
95 # For Debian
François Grisez 20.1 96 wget https://linphone.org/snapshots/debian/keyring.gpg -O - | sudo apt-key add -
François Grisez 44.1 97
98 # For Ubuntu
99 wget https://www.linphone.org/snapshots/ubuntu/pubkey.gpg -O - | sudo apt-key add -
SandrineAvakian 1.1 100 {{/code}}
101
Peio Rigaux 57.2 102 3. Install development packages for SQL backend (example below for Mariadb, classic use case)
François Grisez 44.1 103
Peio Rigaux 57.2 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
François Grisez 20.1 110 (% id="HUpdateaptitudeandinstallflexisipandit27sdependencies" %)
Peio Rigaux 57.2 111 4. Update APT cache and install Flexisip and its dependencies
François Grisez 8.1 112
François Grisez 9.1 113 {{code}}
François Grisez 20.1 114 apt update
115 apt install bc-flexisip
François Grisez 9.1 116 {{/code}}
François Grisez 8.1 117
Peio Rigaux 57.2 118
François Grisez 37.1 119 The installation is completed. You can directly go to [[Post-installation instructions>>path:#HPost-installationinstructions]] section.
120
François Grisez 22.1 121 = Installation from sources using git =
SandrineAvakian 1.1 122
François Grisez 30.1 123 The source code of Flexisip is available on our GitLab instance [[here>>https://gitlab.linphone.org/BC/public/flexisip]].
SandrineAvakian 1.1 124
François Grisez 30.1 125 ~1. Fetch the source code by cloning the repository recursively:
SandrineAvakian 1.1 126
127 {{code}}
François Grisez 30.1 128 git clone https://gitlab.linphone.org/BC/public/flexisip --recursive -b <branch_name>
SandrineAvakian 1.1 129 {{/code}}
130
François Grisez 31.1 131 Replace //<branch_name>// by one of the following:
François Grisez 30.1 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
François Grisez 33.1 139 = Post-installation instructions =
SandrineAvakian 1.1 140
François Grisez 38.1 141 == Generate the configuration file ==
François Grisez 33.1 142
François Grisez 37.2 143 Make Flexisip to generate its default configuration file:
SandrineAvakian 1.1 144
François Grisez 46.1 145 {{code language="bash"}}
François Grisez 37.2 146 # as root
147 /opt/belledonne-communications/bin/flexisip --dump-default all > /etc/flexisip/flexisip.conf
SandrineAvakian 2.1 148 {{/code}}
SandrineAvakian 1.1 149
François Grisez 37.2 150 This generated file contains all the available settings with their respective documentation.
SandrineAvakian 1.1 151
François Grisez 37.2 152 By default, Flexisip behaves as a simple forwarding proxy. See [[Configuration>>Configuration]] chapter for more information about how to customize it.
SandrineAvakian 1.1 153
François Grisez 40.1 154 == Starting the needed services ==
SandrineAvakian 1.1 155
Simon Morlat 49.1 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 :
SandrineAvakian 1.1 157
François Grisez 40.1 158 * proxy : launch Flexisip as a SIP proxy (default behaviour).
Simon Morlat 50.1 159 * presence : launch Flexisip as a [[presence server>>doc:Flexisip.C\. Features.Presence server.WebHome]].
Simon Morlat 49.1 160 * conference : launch Flexisip as a conference server (group chat).
SandrineAvakian 1.1 161
François Grisez 47.1 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:
François Grisez 40.1 163
164 {{code language="bash"}}
Simon Morlat 49.1 165 systemctl start flexisip-proxy flexisip-presence
François Grisez 40.1 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"}}
François Grisez 41.1 171 # Make the proxy and presence servers to start on system boot
Simon Morlat 49.1 172 systemctl enable flexisip-proxy flexisip-presence
François Grisez 40.1 173 {{/code}}
174
Simon Morlat 49.1 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
François Grisez 33.1 177 == Firewall configuration ==
Simon Morlat 13.2 178
François Grisez 42.1 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**.
Simon Morlat 12.1 180
181 Simply turning off the firewall will allow full operation:
182
183 {{code language="sh"}}
184 sudo systemctl stop firewalld
185 {{/code}}
186
François Grisez 42.1 187 however your system administrator may not like this approach, and will prefer enabling selective ports. A Flexisip server will generally need:
Simon Morlat 12.1 188
François Grisez 51.1 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 ;
François Grisez 42.1 190 * the 3478 UDP port for the builtin STUN server that helps clients to use ICE for efficient media stream transmissions ;
François Grisez 51.1 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]].