• CentOS7环境源码安装freeswitch1.10.7


    操作系统 :CentOS 7.6_x64     

    freeswitch版本 :1.10.7

    一、安装步骤

    1、下载freeswitch源代码

    wget http://files.freeswitch.org/releases/freeswitch/freeswitch-1.10.7.-release.tar.gz
    

    2、安装依赖环境

    yum install autoconf automake postgresql-devel libtool  gcc gcc-c++ libtiff  libtiff-devel  libjpeg-devel  openssl-devel  
    yum install libuuid-devel  yasm nasm sqlite-devel libcurl-devel  speex-devel  ldns-devel  libedit-devel  lua-devel  libsndfile-devel

    3、 开始安装,依次执行如下命令

    tar zxvf freeswitch-1.10.7.-release.tar.gz
    cd freeswitch-1.10.7.-release
    ./rebootstrap.sh 
    #CFLAGS="-O3 -fPIC" ./configure --disable-signalwire (可选)
    CFLAGS="-O3 -fPIC" ./configure 
    make -j
    make install
    make hd-sounds-install && make hd-moh-install 
    # make cd-sounds-install && make cd-moh-install (可选)
    make samples

    4、 建立软连接,以方便使用

    ln -sf /usr/local/freeswitch/bin/freeswitch /usr/local/bin/
    ln -sf /usr/local/freeswitch/bin/fs_cli /usr/local/bin/

    启动freeswith

        freeswitch -nc -nonat  :后台启动freeswitch

    使用命令行客户管理freeswith

        fs_cli :进入客户端(/exit 退出客户端)

    关闭freeswitch

        freeswitch -stop

    5、 打包二进制文件

    cd /usr/local/
    tar zcvf freeswitch-1.10.7-release.tar.gz freeswitch/

    二、常见问题

    问题1:

    configure: error: no usable spandsp;please install spandsp3

    解决方法:

    git clone https://github.com/freeswitch/spandsp.git
    cd spanddsp
    ./bootstrap.sh
    ./configure
    make install
    export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:${PKG_CONFIG_PATH}
    ldconfig

    问题2:

    checking for sofia-sip-ua >= 1.13.6... configure: error: no usable sofia-sip; please install sofia-sip-ua devel package or equivalent

    解决方法:

    git clone https://github.com/freeswitch/sofia-sip.git
    cd sofia-sip/
    ./bootstrap.sh
    ./configure
    make
    make install
    ldconfig

    问题3:

    提示未安装signalwire

    解决办法:

    1)安装 libks(signalwire的依赖项)

    yum install libuuid-devel libatomic
    git clone https://github.com/signalwire/libks.git
    cd libks
    cmake .
    make
    make install

    2)安装 signalwire

    git clone https://github.com/signalwire/signalwire-c.git
    cd signalwire-c
    cmake .
    make
    sudo make install

    问题4:

    libtool: Version mismatch error.  This is libtool 2.4.6 Debian-2.4.6-2, but the
    libtool: definition of this LT_INIT comes from libtool 2.4.2.

    解决方法:

    autoreconf -fiv

    问题5:

    /usr/local/lib/libavformat.a(allformats.o): relocation R_X86_64_32 against symbol `ff_a64_muxer' can not be used when making a shared object; recompile with -fPIC

    解决方法:

    ffmpeg未安装或配置不对,重新安装ffmpeg即可,具体可参考:https://www.cnblogs.com/MikeZhang/p/centos7-ffmpeg.html

    问题6:

    You must install libopus-dev to build mod_opus.

    解决方法:

    wget https://archive.mozilla.org/pub/opus/opus-1.3.1.tar.gz
    tar zxvf opus-1.3.1.tar.gz
    cd opus-1.3.1
    ./configure  --enable-shared
    make
    make install
    cp /usr/local/lib/pkgconfig/opus.pc /usr/lib64/pkgconfig

    三、其它

    1、使用cmake时,需要升级版本,或直接下载二进制使用:

    cmake下载地址:https://cmake.org/download/

    使用如下:

    tar zxvf cmake-3.23.1-linux-x86_64.tar.gz
    mv cmake-3.23.1-linux-x86_64 /usr/local/
    ln /usr/local/cmake-3.23.1-linux-x86_64/bin/cmake -s /usr/local/bin/cmake

    2、需要安装sndfile库,否则会无法读取wav文件。

    3、本文涉及freeswitch源代码及依赖文件如下:

    可从百度网盘获取:https://pan.baidu.com/s/1WaCntzkB0QOzhskfJX5Beg

    关注微信公众号(聊聊博文)后回复 2022100701 获取提取码。 

  • E-Mail : Mike_Zhang@live.com
  • 转载请注明出处,谢谢!
  • 相关阅读:
    将.net core api 部署成windows服务
    根据2个经纬度点,计算这2个经纬度点之间的距离(通过经度纬度得到距离)
    .NET 基础知识 单文件部署和可执行文件 剪裁独立部署和可执行文件
    通过 InnoSetup 美化安装界面
    拼凑一个ABP VNext管理后台拼凑一个ABP VNext管理后台
    互联网软件的安装包界面设计Inno setup
    weinre  远程实时调试手机上的Web页面 JAVASCRIPT远程调试
    asp.net core web应用以服务的方式安装运行
    用 vue2 和 webpack 快速建构 NW.js 项目
    谷歌插件抓包 similarweb抓包
  • 原文地址:https://www.cnblogs.com/MikeZhang/p/centos7InstallFs20221007.html
  • Copyright © 2020-2023  润新知