CentOS7.9安装FreeSWITCH1.10.9教程

尽量不要改变以下各个步骤的安装顺序

make后报错, 在解决错误后需要执行make clean命令, 再执行configure继续

需要用到 autoconf-2.71 cmake-3.23.0 freeswitch-1.10.9 opus-1.3.1 yasm-1.3.0 spandsp和sofia-sip 可以提前下载好解压包 方便批量安装, 其中spandsp最新提交和freeswitch1.10.9不匹配, 需要切换到0d2e6ac65e0e8f53d652665a743015a88bf048d4提交

spandsp和sofia-sip需要从github或者gitee下载, 用gitee的话搜索一下仓库, 我这里的下载链接就只放官方的库了.

 

教程开始

#更新yum
yum -y update

#安装freeswitch的依赖包
yum -y install -y git alsa-lib-devel autoconf automake bison broadvoice-devel bzip2 curl-devel libdb4-devel e2fsprogs-devel erlang flite-devel g722_1-devel gcc-c++ gdbm-devel gnutls-devel ilbc2-devel ldns-devel libcodec2-devel libcurl-devel libedit-devel libidn-devel libjpeg-devel libmemcached-devel libogg-devel libsilk-devel libsndfile-devel libtheora-devel libtiff-devel libtool libuuid-devel libvorbis-devel libxml2-devel lua-devel lzo-devel mongo-c-driver-devel ncurses-devel net-snmp-devel openssl-devel opus-devel pcre-devel perl perl-ExtUtils-Embed pkgconfig portaudio-devel postgresql-devel python-devel python-devel soundtouch-devel speex-devel sqlite-devel unbound-devel unixODBC-devel wget which yasm zlib-devel libshout-devel libmpg123-devel lame-devel

cd /usr/local/src/

#下载依赖

wget https://github.com/Kitware/CMake/releases/download/v3.23.0/cmake-3.23.0.tar.gz

wget http://mirrors.kernel.org/gnu/autoconf/autoconf-2.71.tar.gz

wget https://archive.mozilla.org/pub/opus/opus-1.3.1.tar.gz
 
#解压
cd /usr/local/src/
tar -xzvf cmake-3.23.0.tar.gz; tar -xzvf autoconf-2.71.tar.gz; tar -xzvf opus-1.3.1.tar.gz;
 

#安装cmake
cd /usr/local/src/cmake-3.23.0 ; ./bootstrap
make && make install

 

#创建cmake连接
sudo ln -sf /usr/local/bin/cmake /usr/bin/cmake
sudo ln -sf /usr/local/bin/cpack /usr/bin/cpack
sudo ln -sf /usr/local/bin/ctest /usr/bin/ctest


#安装autoconf
cd /usr/local/src/autoconf-2.71 ; ./configure
make && make install


#安装opus
yum -y remove opus
cd /usr/local/src/opus-1.3.1 ; ./configure
make && make install


#安装freeswitch
cd /usr/local/src
git clone -b v1.10.9 https://github.com/signalwire/freeswitch

cd /usr/local/src/freeswitch
git clone https://github.com/freeswitch/spandsp.git
git clone https://github.com/freeswitch/sofia-sip.git

 

#安装spandsp
cd /usr/local/src/freeswitch/spandsp
git checkout -b finecode20230705 0d2e6ac65e0e8f53d652665a743015a88bf048d4
./bootstrap.sh
./configure
make && make install


#安装sofia-sip
cd /usr/local/src/freeswitch/sofia-sip ; ./bootstrap.sh
./configure
make && make install


#添加路径到系统配置
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:${PKG_CONFIG_PATH}
ldconfig

#先将不需要的模块注释掉,不安装
cd /usr/local/src/freeswitch ; ./bootstrap.sh
vim modules.conf

#注释掉 applications/mod_av,applications/mod_signalwire,endpoints/mod_verto;

./configure --enable-portable-binary --prefix=/usr/local/freeswitch --with-gnu-ld --with-python --with-openssl --enable-core-odbc-support --enable-zrtp
make && make install

posted @ 2023-10-31 17:29  在风里  阅读(550)  评论(0编辑  收藏  举报