- Created by Yeison CAMARGO, last modified by John Boteler on 2016.02.02
Go to start of metadata
About
This is a FreeSWITCH installation manual tested in virtual machines with CentOS 6.5 32-bit and 64-bit operating systems.
Click to expand Table of Contents
FreeSWITCH 1.6 depends on many updated system libraries which is available in Debian 8, but can is distributed for Ce Ntos due to licensing restrictions or, require additional work to include in CentOS distributions. As of September the FS team can not be recommend CentOS 6 for modern versions of freeswitch™.
Build from Sourceautomatic Makefile
The Freeswitch™team has prepared a Makefile of the source tree that pulls down all dependencies and builds FreeSWITCH. It's available in the Stash repository at
Https://stash.freeswitch.org/projects/FS/repos/freeswitch/browse/build/Makefile.centos6?raw
Simply Copy the contents of the above link into ' Makefile ' and then run ' make ' in the same directory, it'll download FREESW ITCH Latest (master) sources into a freeswitch.git subdir of the current dir (so, if you could want to does this in/usr/src or/ USR/LOCAL/SRC).
If you want to compile and install RELEASE Branch, edit the above Makefile and add "-B v1.4" just after the word "clone" .
When finished, FreeSWITCH should be located under/usr/local/freeswitch
Now continue below at Set Owner and Permissions. If you find a errors please see the Corrections page.
Manual Build
Install Libraries and Pre-requisites
Install Prerequisites
# Add the RPM repository rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm ### OR a European repository rpm -ivh http://mirror.cedia.org.ec/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm # Install necessary components yum install git gcc-c++ autoconf automake libtool wget python ncurses-devel zlib-devel libjpeg-devel openssl-devel e2fsprogs-devel sqlite-devel libcurl-devel pcre-devel speex-devel ldns-devel libedit-devel |
Download freeswitch™source Code, configure modules, compile, install
Install FreeSWITCH
cd /usr/src
# To build from Master, the latest source code:
git clone https://freeswitch.org/stash/scm/fs/freeswitch.git
##### OR #####
# To build from the current release source code:
git clone -b v1.4 https://freeswitch.org/stash/scm/fs/freeswitch.git
cd /usr/src/freeswitch
# The -j argument spawns multiple threads to speed the build process
./bootstrap.sh -j
# if you want to add or remove modules from the build, edit modules.conf
vi modules.conf
# add a module by removing ‘#‘ comment character at the beginning of the line
# remove a module by inserting the ‘#‘ comment character at the beginning of the line containing the name of the module to be skipped
./configure -C
make && make install
|
Install Sounds
Install sounds:
cd-quality Sounds
make cd-sounds-install make cd-moh-install |
Installing higher quality sounds would automatically install lesser quality sounds.
If you are need 8KHz sounds, you can save time and bandwidth:
8KC Sounds
make sounds-install make moh-install |
Set Owner and Permissions
# create user ‘freeswitch‘ # add it to group ‘daemon‘ # change owner and group of the freeswitch installation cd /usr/local useradd --system --home-dir /usr/local/freeswitch -G daemon freeswitch passwd -l freeswitch chown -R freeswitch:daemon /usr/local/freeswitch/ chmod -R 770 /usr/local/freeswitch/ chmod -R 750 /usr/local/freeswitch/bin/* mkdir /var/run/freeswitch chown -R freeswitch:daemon /var/run/freeswitch ln -s /usr/local/freeswitch/bin/freeswitch /usr/bin/ # needed by /etc/init.d/freeswitch |
Start Freeswitchfirst Time
Cd/usr/local/freeswitch/bin
./freeswitch
This would start Freeswitch™and output many messages to the screens, allowing you to observe the startup sequence and any E Rror messages. It's a good Thing to doing this at least once so, can see the modules being loaded and understand how much informati On are available to you as a learn how to work with freeswitch™. After all modules, users, and profiles has fully loaded you'll see a prompt similar to
[Email protected]>
Where domain is replaced by the domain name, machine name, or I.P. Address on which Freeswitch™is running. Refer to Mod_commands to learn what commands is available. Start with
Sofia Status
Type ' help ' to get a long listing of commands available. Refer to Mod_commands for descriptions of the commands.
Automatic Start at Boot
To get FreeSWITCH-to-start automatically at system start, just copy the FreeSWITCH init script into THE/ETC/INIT.D Directory. An example init script was included in the Git repository, under the build directory, named as Freeswitch.init.redhat. Need to modify the script to get FreeSWITCH starting up from the directory where the binaries is installed. After the file have been modified to suit your needs, simply run this command:
cp /usr/src/freeswitch/build/freeswitch /etc/init .d /freeswitch chmod 750 /etc/init .d / FreeSWITCH chown freeswitch:daemon /etc/init .d / FreeSWITCH chkconfig--add freeswitch && chkconfig--levels 35 FreeSWITCH on |
This procedure would also work exactly the same of the on Fedora systems.
CentOS 6 DEPRECATED