为了方便freeswitch安装,给大家分享一个本人的一键安装脚本,无插件,源生安装,配置好yum源即可,试用于centos
#!/bin/bash
yum install -y git alsa-lib-devel autoconf automake bison
yum install -y broadvoice-devel bzip2 curl-devel db-devel e2fsprogs-devel flite-devel g722_1-devel
yum install -y gcc-c++ gdbm-devel gnutls-devel ilbc2-devel ldns-devel libcodec2-devel libcurl-devel
yum install -y libedit-devel libidn-devel libjpeg-devel libmemcached-devel libogg-devel libsilk-devel
yum install -y libsndfile-devel libtheora-devel libtiff-devel libtool libuuid-devel libvorbis-devel
yum install -y libxml2-devel lua-devel lzo-devel mongo-c-driver-devel ncurses-devel net-snmp-devel
yum install -y openssl-devel opus-devel pcre-devel perl perl-ExtUtils-Embed pkgconfig portaudio-devel
yum install -y postgresql-devel python26-devel python-devel soundtouch-devel speex-devel sqlite-devel
yum install -y unbound-devel unixODBC-devel wget which yasm zlib-devel
cd /usr/src
git clone -b v1.6 https://freeswitch.org/stash/scm/fs/freeswitch.git
cd /usr/src/freeswitch/
./bootstrap.sh -j
#禁用xml_cdr
sed -i \'/xml_int\\/mod_xml_cdr/d\' /usr/src/freeswitch/modules.conf
#禁用opus编码
sed -i \'/codecs\\/mod_opus/d\' /usr/src/freeswitch/modules.conf
#禁用中文
sed -i \'s/#say\\/mod_say_zh/say\\/mod_say_zh/g\' /usr/src/freeswitch/modules.conf
sed -i \'s/#xml_int\\/mod_xml_curl/xml_int\\/mod_xml_curl/g\' /usr/src/freeswitch/modules.conf
#禁用视频
sed -i \'/applications\\/mod_av/d\' /usr/src/freeswitch/modules.conf
sed -i \'s/#applications\\/mod_av/applications\\/mod_av/g\' /usr/src/freeswitch/modules.conf
sed -i \'/formats\\/mod_vlc/d\' /usr/src/freeswitch/modules.conf
sed -i \'s/#endpoints\\/mod_rtmp/endpoints\\/mod_rtmp/g\' /usr/src/freeswitch/modules.conf
#取出mod_shout节省资源
sed -i \'s/#formats\\/mod_shout/formats\\/mod_shout/g\' /usr/src/freeswitch/modules.conf
sed -i \'/formats\\/mod_shout/d\' /usr/src/freeswitch/modules.conf
#禁用tts
sed -i \'s/#asr_tts\\/mod_tts_commandline/asr_tts\\/mod_tts_commandline/g\' /usr/src/freeswitch/modules.conf
./configure --enable-core-odbc-support --disable-libyuv --disable-libvpx
#下载声音文件
make && make install
make sounds-install
make moh-install
make install
#制作软链接
ln -sf /usr/local/freeswitch/bin/freeswitch /usr/bin/
ln -sf /usr/local/freeswitch/bin/fs_cli /usr/bin/
版权声明
本文仅代表作者观点,不代表百度立场。
本文系作者授权百度百家发表,未经许可,不得转载。



