CentOS 6 DEPRECATED
About
This a FreeSWITCH installation manual tested in virtual machines with CentOS 6.5 32-bit and 64-bit operating systems.
FreeSWITCH 1.6 depends on many updated system libraries which are available in Debian 8, but can not be distributed for CentOS due to licensing restrictions or that require additional work to include in CentOS distributions. As of September 2015 the FS team can not recommend CentOS 6 for modern versions of FreeSWITCH™.
Build From Source
Automatic Makefile
The FreeSWITCH™ team has prepared a Makefile in the source tree that pulls down all dependencies and builds FreeSWITCH. It is 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', then run 'make' in the same directory, it will download FreeSWITCH latest (master) sources into a freeswitch.git subdir of the current dir (so, you may want to do 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 any errors please see the Corrections page.
Manual Build
Install libraries and pre-requisites
# Add the RPM repository ### OR a European repository # 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
cd /usr/src # To build from Master, the latest source code: ##### 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:
make cd-sounds-install make cd-moh-install |
Installing higher quality sounds will automatically install lesser quality sounds.
If you only need 8KHz sounds, you can save time and bandwidth:
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 FreeSWITCH
First Time
cd /usr/local/freeswitch/bin
./freeswitch
This will start FreeSWITCH™ and output many messages to the screen, allowing you to observe the startup sequence and any error messages. It is a Good Thing to do this at least once so that you can see the modules being loaded and understand how much information is available to you as you learn how to work with FreeSWITCH™. After all modules, users, and profiles have fully loaded you will see a prompt similar to
freeswitch@domain>
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 are 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 up automatically at system start, just copy the FreeSWITCH init script into the /etc/init.d directory. An example init script is included in the git repository, under the build directory, named as freeswitch.init.redhat. You may need to modify the script to get FreeSWITCH starting up from the directory where the binaries are installed. After the file has been modified to suit your needs, simply run this command:
cp /usr/src/freeswitch/build/freeswitch .init.redhat /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 will also work exactly the same way on Fedora systems.
posted on 2016-04-19 10:16 cn三少<script></script> 阅读(262) 评论(0) 编辑 收藏 举报