Use the yum package manager tool or Add/Remove Applications menu function to add the following packages to a basic installation:
yum install autoconf automake gcc-c++ git-core libjpeg-devel libtool make ncurses-devel pkgconfig
To install the optional packages needed to enable all FreeSWITCH modules to be built:
yum install unixODBC-devel openssl-devel libogg-devel libvorbis-devel libcurl-devel \
libtiff-devel libjpeg-devel python-devel expat-devel zlib zlib-devel bzip2 \
which pcre pcre-devel speex-devel sqlite-devel
sudo yum install expat-devel openssl-devel libtiff-devel libX11-devel unixODBC-devel libssl-devel python-devel \
zlib-devel libzrtpcpp-devel alsa-lib-devel libogg-devel libvorbis-devel perl-libs gdbm-devel \
libdb-devel uuid-devel @development-tools
from (http://wiki.freeswitch.org/wiki/Linux_Quick_Install_Guide#Downlo
Git:
git clone https://stash.freeswitch.org/scm/fs/freeswitch.git
cd freeswitch ./bootstrap.sh
This is optional but consider editing modules.conf.
./configure make
make all install cd-sounds-install cd-moh-install
You will also need to install the following packages if you need the modules listed below:
FreeSWITCH is now available via yum. You will need to add the FreeSWITCH yum repository
To install the FreeSWITCH Repo
rpm -Uvh http://files.freeswitch.org/freeswitch-release-1-0.noarch.rpm
Then to install FreeSWITCH with the generic vanilla example configs
yum install --nogpgcheck freeswitch-config-vanilla
This will give you a base working FreeSWITCH. At the time of this update (2012-FEB-13) these RPMs are Beta but should be working fine. Please report any bugs in them via JIRA
After that you need to install FreeSWITCH sound related files. For that you need to issue following command.
yum install sox freeswitch-sounds*
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:
chkconfig --add freeswitch && chkconfig --levels 35 freeswitch on
This procedure will also work exactly the same way on Fedora systems.
Continue with the normal installation steps or the Linux Quick Install Guide Downloads section.
Required: openssl version 1.0.1g or later to build
For CentOS 5:
wget http://www.openssl.org/source/openssl-1.0.1g.tar.gz tar -zxvf openssl-1.0.1g.tar.gz cd openssl-1.0.1f ./config --prefix=/usr/openssl101g -fPIC make make install then go over to FS build root (even on existing build that had picked up the dependency by a git pull) ./configure CFLAGS="-I/usr/openssl101g/include" LDFLAGS="-L/usr/openssl101g/lib" then build as normal
A change by Red Hat in RHEL 6 and later releases was to compile the kernel to run tickless by default. As previously brought up on the mailing lists, it is recommended that the kernel's tickless feature should be disabled for optimum performance when running FreeSwitch under the newer operating system's kernel. You can disable the tickless feature by appending nohz=off to your boot options under GRUB. The GRUB start up configuration file is located under /boot/grub or as /etc/grub.conf. Add it to the line beginning with "kernel". This is also applicable to Fedora releases 8 and later.
In addition, FS may not behave 100% correctly in CentOS 6.x, please review Jira issues: FS-4396, FS-4316, FS-4291
UPDATE: We have anecdotal evidence that CentOS 6.3 does not seem to have the problems listed above. If you experience any of the above symptoms with CentOS 6.3 please comment on the Jira cases listed.
For current installation instructions, please refer to the new FreeSWITCH documentation athttps://confluence.freeswitch.org/display/FREESWITCH/Installation
Git provides access to the latest features and bug fixes added throughout the day. Most often you will only use the clone and pull commands. There is an excellent Online Git Book available in multiple languages. For help installing Git see Git_Install. The following creates a freeswitch directory and downloads a "clone" of the current source:
cd /usr/local/src git clone git://git.freeswitch.org/freeswitch.git OR git clone -b v1.2.stable git://git.freeswitch.org/freeswitch.git (SEE BELOW)
Note: git reset --hard
There are 2 branches in Git - Master and v1.2.stable
v1.2.stable is the branch for the 1.2 series. It contains the most recent 1.2.x release, plus any patches made since that release.
git clone -b v1.2.stable git://git.freeswitch.org/freeswitch.git
Master is where the development for the future 1.4 release is being done. New features are added to this branch, but it may be less stable than 1.2.stable at times.
git clone git://git.freeswitch.org/freeswitch.git
You can switch branches on an already cloned Git tree:
git checkout v1.2.stable git checkout master
If you get an error on GIT PULL on v1.2.stable saying You asked me to pull without telling me which branch you want to merge with
Then run this to add the definition for that branch to .git/config:
git branch --set-upstream v1.2.stable origin/v1.2.stable
You can see all remote branches with git branch -r. You can check out 1.4beta for example with
git checkout v1.4.beta
Some more information for people trying git tag: 1.4beta is snapshots of the 1.5 dev codebase. Some time in future, 1.4 will replace 1.2 as the stable branch.
Sometimes when things go terribly wrong with the latest commits (regression-type bugs), you can always revert to an earlier commit with git. Simply type in:
git checkout
where
After reverting to a previous version, it is strongly recommended that you (in the following order):
... before you re-build the code from an earlier revision.
To go back to the very latest commit from the development branch, simply type in
git checkout master
To reverse only the one commit change on newer build
git log -1 -p| patch -p1 -R
Contributed source may be obtained from the freeswitch-contrib tree as follows (this will compile and install updates):
git clone git://git.freeswitch.org/freeswitch-contrib.git
Sample configs can be downloaded as well:
git clone git://git.freeswitch.org/freeswitch-sample-configs.git
The Latest Build site latest.freeswitch.org is currently empty.
Ensure that the required prerequisites are installed. Also check if there are notes for your distribution in Distribution Information and Installation.
The remaining commands are executed from the directory containing the FreeSWITCH™ source (use whatever directory the source is located in):
cd /usr/local/src/freeswitch
If Git was used to download, the configuration files must be built before the first compile. ./bootstrap.sh creates many files including modules.conf. Once this is performed it's not normally required to be performed again. If you're installing from a tarball, this script was run before packaging, and you shouldn't need to run it.
./bootstrap.sh
You can use multiple cores for your bootstrap/config/build, by specifying it at the start, e.g.: (note this may make build errors harder to spot)
./bootstrap.sh -j
However, its not recommended to use the -j flag for either bootstrap.sh or make, on bootstrap.sh on a slow machine (older machines or say a raspberry pi) -j will fail randomly due to how it is handled. on the make this may also randomly fail. (quoted from Ken Rice in FS-4891)