由于要试验一个视频会议的项目,所以需要server端用最新的Freeswitch来进行测试
1. 准备工作:
yum install autoconf automake gcc-c++ git-core libjpeg-devel libtool make ncurses-devel pkgconfig
yum install unixODBC-devel openssl-devel libogg-devel libvorbis-devel curl-devel \ libtiff-devel libjpeg-devel python-devel expat-devel zlib zlib-devel bzip2 which
2. 下载最新的Freeswitch安装包:
http://files.freeswitch.org/freeswitch-1.4.15.tar.gz
copy到/opt下面解压
3. 执行./configure
此时会报错: checking for sqlite3 >= 3.6.20... Package sqlite3 was not found in the pkg-config search path. Perhaps you should add the directory containing `sqlite3.pc' to the PKG_CONFIG_PATH environment variable No package 'sqlite3' found
configure: error: Library requirements (sqlite3 >= 3.6.20) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.
看来是没有安装sqlite3的包
4. 安装sqlite3:
下载sqlite3安装配置文件: http://www.sqlite.org/2015/sqlite-autoconf-3080800.tar.gz
解压后./configure make make install
yum install sqlite-devel
[root@vtc-test1 sqlite-autoconf-3080800]# sqlite3 --version
3.8.8 2015-01-16 12:08:06 7d68a42face3ab14ed88407d4331872f5b243fdf
5. 回到Freeswitch
又遇到新的问题: checking for libpcre >= 7.8... Package libpcre was not found in the pkg-config search path. Perhaps you should add the directory containing `libpcre.pc' to the PKG_CONFIG_PATH environment variable No package 'libpcre' found
configure: error: Library requirements (libpcre >= 7.8) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.
yum install libpcre-devel后继续
(如果没有这个包的话可以直接从以下地址下载: http://rpm.pbone.net/index.php3/stat/4/idpl/23606412/dir/centos_6/com/pcre-devel-8.13-1.1.x86_64.rpm.html
如果遇到NOKEY的错误可以:
rpm --import /etc/pki/rpm-gpg/RPM*
然后重新安装即可正常,或者直接带--force --nodeps参数安装;
rpm -ivh *rpm --force --nodeps 这样即可正常安装。
) checking for speex >= 1.2rc1 speexdsp >= 1.2rc1... Package speex was not found in the pkg-config search path. Perhaps you should add the directory containing `speex.pc' to the PKG_CONFIG_PATH environment variable No package 'speex' found Package speexdsp was not found in the pkg-config search path. Perhaps you should add the directory containing `speexdsp.pc' to the PKG_CONFIG_PATH environment variable No package 'speexdsp' found
configure: error: Library requirements (speex >= 1.2rc1 speexdsp >= 1.2rc1) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.
yum install speex-devel后继续
checking for libldns >= 1.6.6... checking for ldns_str2rdf_a in -lldns... no
configure: error: You need to either install libldns-dev or disable mod_enum in modules.conf
按照提示注释掉mod_enum在modules.conf文件中
configure: error: You need to either install libedit-dev (>= 2.11) or configure with --disable-core-libedit-support
yum install libedit-devel
看来这已经是最后一个block了,重新运行./configure 成功通过;
Registering you for ClueCon http://www.cluecon.com .. See you in August. ;-)
-------------------------- FreeSWITCH configuration --------------------------
Locations:
FHS enabled: no
prefix: /usr/local/freeswitch
exec_prefix: ${prefix}
bindir: ${exec_prefix}/bin
sysconfdir: /usr/local/freeswitch/conf
libdir: ${exec_prefix}/lib
certsdir: /usr/local/freeswitch/certs
dbdir: /usr/local/freeswitch/db
grammardir: /usr/local/freeswitch/grammar
htdocsdir: /usr/local/freeswitch/htdocs
logfiledir: /usr/local/freeswitch/log
modulesdir: /usr/local/freeswitch/mod
pkgconfigdir: ${exec_prefix}/lib/pkgconfig
recordingsdir: /usr/local/freeswitch/recordings
runtimedir: /usr/local/freeswitch/run
scriptdir: /usr/local/freeswitch/scripts
soundsdir: /usr/local/freeswitch/sounds
storagedir: /usr/local/freeswitch/storage
cachedir: /usr/local/freeswitch/cache
------------------------------------------------------------------------------
6. make
出现的错误是connot connect to files.freeswitch.org
修改/etc/wgetrc
https_proxy = http://135.3.26.190:xxxxx/
http_proxy = http://135.3.26.190:xxxxx/
ftp_proxy = http://135.3.26.190:xxxxx/
export http_proxy=http://135.3.26.190:xxxxx/
重新make
7. 加载声音文件
make all install cd-sounds-install cd-moh-install
Freeswitch安装完成:)