1.下载fs代码。
git
clone https://freeswitch.org/stash/scm/fs/freeswitch.git
我装的是1.8
2.安装依赖
sudo apt-get install -y autoconf git libtool g++ zlib1g-dev libjpeg-dev libsqlite3-dev libcurl4-openssl-dev libpcre3-dev libspeex-dev libspeexdsp-dev libldns-dev libedit-dev libssl-dev pkg-config yasm liblua5.2-dev libopus-dev libsndfile-dev libpq-dev pkg-config
3.在fs目录代码目录中,运行
(1)如果出下如下错误,
bootstrap: libtool not found.
You need libtool version 1.5.14 or newer to build FreeSWITCH from source.
在ubuntu只有libtoolize,修改bootstrap.sh,
libtool=${LIBTOOL:-`${LIBDIR}/apr/build/PrintPath glibtool libtool libtool22 libtool15 libtool14 libtoolize`}
(2)如果要添加模块,默认部分不添加
如添加mod_av模块,在freeswitch目录下modules.conf中把mod_av前面#去掉.
需添加ffmpeg依赖,sudo apt-get install libswscale* Libavresample* 等
./configure
5.编译 安装
make && make install (sudo make install)
出现can not find -llua 是因为找不到liblua.so
需创建软链接 ln liblua50.so liblua.so
6.声源:可选
make cd-sounds-install
make cd-moh-install