• Centos7 下安装freeswitch 1.8.5及遇到的问题


    1、前期准备
    yum install net-tools
    关闭防火墙

    //临时关闭
    systemctl stop firewalld
    //禁止开机启动
    systemctl disable firewalld
    setenforce 0

    2、centos 7 安装依赖包

    yum install -y http://files.freeswitch.org/freeswitch-release-1-6.noarch.rpm epel-release
    
    yum 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

    3、安装odbc,因为后面会涉及到odbc的安装,所以先安装odbc

    yum install unixODBC-devel
    yum install mysql-connector-odbc

    安装完成后编辑/etc/odbcinst.ini

    # Example driver definitions
     
    # Driver from the postgresql-odbc package
    # Setup from the unixODBC package
    [PostgreSQL]
    Description     = ODBC for PostgreSQL
    Driver          = /usr/lib/psqlodbcw.so
    Setup           = /usr/lib/libodbcpsqlS.so
    Driver64        = /usr/lib64/psqlodbcw.so
    Setup64         = /usr/lib64/libodbcpsqlS.so
    FileUsage       = 1
     
     
    # Driver from the mysql-connector-odbc package
    # Setup from the unixODBC package
    [MySQL]
    Description     = ODBC for MySQL
    Driver          = /usr/lib64/libmyodbc5.so
    Setup           = /usr/lib64/libodbcmyS.so
    Driver64        = /usr/lib64/libmyodbc5.so
    Setup64         = /usr/lib64/libodbcmyS.so
    FileUsage       = 1

    编辑/etc/odbc.ini

    [freeswitch]
    Description=MySQL realtime database
    Driver=/usr/lib64/libmyodbc5.so
    SERVER =数据库地址
    PORT =3306
    DATABASE = freeswitch
    OPTION  =67108864
    CHARSET = UTF8
    USER = 数据库账号
    PASSWORD = 数据库密码
    Threading = 0

    输入:isql -v freeswitch测试是否能够连通

    4、编译freeswitch 1.8.5
    freeswitch下载地址:http://files.freeswitch.org/freeswitch-releases/freeswitch-1.8.5.tar.bz2

    * wget http://files.freeswitch.org/freeswitch-releases/freeswitch-1.8.5.tar.bz2
    * tar xvjf freeswitch-1.8.5.tar.bz2
    * cd freeswitch-1.8.5
    * ./configure  -C --enable-core-odbc-support    #如果读者不想使用mysql管理,只需要执行./configure即可
    * make 
    * make install

    4.1.1  make中间出现的错误:

    making all mod_signalwire
    make[4]: Entering directory `/usr/local/src/freeswitch/src/mod/applications/mod_signalwire'
    Makefile:916: *** You must install libks to build mod_signalwire.  Stop.
    make[4]: Leaving directory `/usr/local/src/freeswitch/src/mod/applications/mod_signalwire'
    make[3]: *** [mod_signalwire-all] Error 1

    根据报错可以看出需要安装需要安装 libks 和 signalwire-c,安装libks前需要先安装cmake。

    yum install libatomic.x86_64   #libks还会提示少libatomic,有的不会提示,为了保证顺利安装,建议yum安装一下
    
    cd /usr/local/src
    wget https://cmake.org/files/v3.13/cmake-3.13.3.tar.gz
    tar -zxvf cmake-3.13.3.tar.gz
    cd cmake-3.13.3 
    ./bootstrap
    gmake
    make install

    安装 libks

    cd /usr/local/src
    git clone https://github.com/signalwire/libks.git
    cd libks
    cmake .
    make
    make install
    
    cp /usr/lib/pkgconfig/libks.pc /usr/lib64/pkgconfig/   #这个比较坑爹,不然还是还找不到libks模块

    安装signalwire-c

    cd /usr/local/src
    git clone https://github.com/signalwire/signalwire-c.git
    cd signalwire-c
    cmake .
    make
    make install
    cp /usr/local/lib/pkgconfig/*.pc /usr/lib64/pkgconfig/
    cp -f /usr/local/lib/* /usr/lib64/

    5、重新编译安装freeswitch:

    cd /usr/local/freeswitch
    ./bootstrap.sh -j
    ./configure --enable-core-odbc-support  #如果读者不想使用mysql管理,只需要执行./configure即可
    make
    make install

    出现如下提示,则以完成安装:

    +---------- FreeSWITCH install Complete ----------+
     + FreeSWITCH has been successfully installed.     +
     +                                                 +
     +       Install sounds:                           +
     +       (uhd-sounds includes hd-sounds, sounds)   +
     +       (hd-sounds includes sounds)               +
     +       ------------------------------------      +
     +                make cd-sounds-install           +
     +                make cd-moh-install              +
     +                                                 +
     +                make uhd-sounds-install          +
     +                make uhd-moh-install             +
     +                                                 +
     +                make hd-sounds-install           +
     +                make hd-moh-install              +
     +                                                 +
     +                make sounds-install              +
     +                make moh-install                 +
     +                                                 +
     +       Install non english sounds:               +
     +       replace XX with language                  +
     +       (ru : Russian)                            +
     +       (fr : French)                             +
     +       ------------------------------------      +
     +                make cd-sounds-XX-install        +
     +                make uhd-sounds-XX-install       +
     +                make hd-sounds-XX-install        +
     +                make sounds-XX-install           +
     +                                                 +
     +       Upgrade to latest:                        +
     +       ----------------------------------        +
     +                make current                     +
     +                                                 +
     +       Rebuild all:                              +
     +       ----------------------------------        +
     +                make sure                        +
     +                                                 +
     +       Install/Re-install default config:        +
     +       ----------------------------------        +
     +                make samples                     +
     +                                                 +
     +                                                 +
     +       Additional resources:                     +
     +       ----------------------------------        +
     +       https://www.freeswitch.org                +
     +       https://freeswitch.org/confluence         +
     +       https://freeswitch.org/jira               +
     +       http://lists.freeswitch.org               +
     +                                                 +
     +       irc.freenode.net / #freeswitch            +
     +                                                 +
     +       Register For ClueCon:                     +
     +       ----------------------------------        +
     +       https://www.cluecon.com                   +
     +                                                 +
     +-------------------------------------------------+
    .=======================================================================================================.
    |       _                            _    ____ _             ____                                       |
    |      /    _ __  _ __  _   _  __ _| |  / ___| |_   _  ___ / ___|___  _ __                             |
    |     / _  | '_ | '_ | | | |/ _` | | | |   | | | | |/ _  |   / _ | '_                             |
    |    / ___ | | | | | | | |_| | (_| | | | |___| | |_| |  __/ |__| (_) | | | |                           |
    |   /_/   \_\_| |_|_| |_|\__,_|\__,_|_|  \____|_|\__,_|\___|\____\___/|_| |_|                           |
    |                                                                                                       |
    |    ____ _____ ____    ____             __                                                             |
    |   |  _ \_   _/ ___|  / ___|___  _ __  / _| ___ _ __ ___ _ __   ___ ___                                |
    |   | |_) || || |     | |   / _ | '_ | |_ / _  '__/ _  '_  / __/ _                                |
    |   |  _ < | || |___  | |__| (_) | | | |  _|  __/ | |  __/ | | | (_|  __/                               |
    |   |_| \_|_| \____|  \____\___/|_| |_|_|  \___|_|  \___|_| |_|\___\___|                               |
    |                                                                                                       |
    |     ____ _             ____                                                                           |
    |    / ___| |_   _  ___ / ___|___  _ __         ___ ___  _ __ ___                                       |
    |   | |   | | | | |/ _  |   / _ | '_        / __/ _ | '_ ` _                                       |
    |   | |___| | |_| |  __/ |__| (_) | | | |  _  | (_| (_) | | | | | |                                     |
    |    \____|_|\__,_|\___|\____\___/|_| |_| (_)  \___\___/|_| |_| |_|                                     |
    |                                                                                                       |
    .=======================================================================================================.

    完成安装之后,设置符号链接:
    ln -sf /usr/local/freeswitch/bin/freeswitch /usr/local/bin/
    ln -sf /usr/local/freeswitch/bin/fs_cli /usr/local/bin/

    安装声音文件
    make cd-sounds-install
    make cd-moh-install

    到此,freeswitch 1.8.5则安装完成。

  • 相关阅读:
    Redis 5.0 redis-cli --cluster
    Redis使用redis-trib.rb创建带密码的集群问题总结
    Docker实战之Redis-Cluster集群
    kafka作为流式处理的上一层,为什么吞吐量那么大?
    LAMP 实现全过程及wordpress的搭建
    mysql
    Mysql读写分离方案-MySQL Proxy环境部署记录
    Centos7.5部署MySQL5.7基于GTID主从复制+并行复制+半同步复制+读写分离(ProxySQL)
    iptables
    Nginx+Keepalived高可用集群
  • 原文地址:https://www.cnblogs.com/Lewis302/p/10466936.html
Copyright © 2020-2023  润新知