安装freeswitch和bluebox全过程centos5.5+freeswitch1.06+bluebox1.01

在CENTOS上安装freeswitch全过程

先把SELinux关了吧
用getenforce检查状态,也可以用sestatus -v命令,如果是enable就用关了它
禁用selinux,打开/etc/selinux/config,改为
# SELINUX=enforcing
SELINUX=disabled

另外,防火墙也暂时关了吧
查看是否开启chkconfig iptables --list
service iptables stop |start
或是chkconfig --levels 345 off iptables下次也不启动
iptables命令相当于操作这个文件/etc/sysconfig/iptables
查看现有的规则:iptables -L -n --line-numbers|less
*************************
首先安装和升级最基本的包,如果您是全新安装并且已经更新,那么下面的命令可能不会安装任何东西。
yum update
yum groupinstall core
yum groupinstall base


引入CT源,安装php5.2 
# cd /etc/yum.repos.d/
# wget http://dev.centos.org/centos/5/CentOS-Testing.repo
# yum -y --enablerepo=c5-testing install php php-mysql php-posix php-gd php-xml

引入EPEL源
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm  

引入webtatic源
(yum install git)这个可不用,直接升级安装到git 1.7.x
rpm -ivh http://repo.webtatic.com/yum/centos/5/`uname -i`/webtatic-release-5-1.noarch.rpm 
yum --enablerepo=webtatic install git

引入Remi源
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm 

预安装
yum --enablerepo=remi install make php php-common php-mysql php-pdo php-soap php-xml php-xmlrpc \
     mysql-server.$(uname -m) mysql.$(uname -m) mysql-devel.$(uname -m) gcc.$(uname -m) \
     gcc-c++.$(uname -m) libtool.$(uname -m) subversion.$(uname -m) curl-devel.$(uname -m) \
     ncurses-devel.$(uname -m) mysql-connector-odbc.$(uname -m) unixODBC.$(uname -m) unixODBC-devel.$(uname -m) \
     libtiff-devel.$(uname -m) libjpeg-devel.$(uname -m) httpd
或是用下面吧,也许也差不多
yum install autoconf automake libtool gcc-c++ ncurses-devel make expat-devel zlib zlib-devel libjpeg-devel unixODBC-devel openssl-devel gnutls-devel libogg-devel libvorbis-devel curl-devel libtiff-devel mysql-server
上面可以缩减为:
yum install ncurses-devel expat-devel zlib zlib-devel libtool libjpeg-devel unixODBC-devel openssl-devel gnutls-devel libogg-devel libvorbis-devel curl-devel libtiff-devel mysql-server


**************************************************

下载解压freeswitch
cd /usr/src/
git clone git://git.freeswitch.org/freeswitch.git
cd /usr/src/freeswitch
./bootstrap.sh
./configure -C
./configure && make && make install && make cd-sounds-install cd-moh-install
后面一个是高质量声音文件的编译安装


准备启动脚本,从源代码那边拷一份
cp build/freeswitch.init.redhat /etc/init.d/freeswitch
chmod 755 /etc/init.d/freeswitch
注意这个文件脚本内,freeswitch安装位置是/opt/freeswitch, 得改成/usr/local/freeswitch

添加到启动项  
1. chkconfig --add freeswitch
2. chkconfig freeswitch on

添加用户freeswitch到用户组freeswitch,并设置freeswitch和php目录的归属
groupadd freeswitch
useradd -g freeswitch -d /usr/local/freeswitch -s /sbin/nologin freeswitch

# chown -R freeswitch:freeswitch /usr/local/freeswitch
# chown -R freeswitch:freeswitch /var/lib/php/session


修改appach设置,变成freeswitch用户和用户组
#
# sed -i "s/User apache/User freeswitch/" /etc/httpd/conf/httpd.conf
# sed -i "s/Group apache/Group freeswitch/" /etc/httpd/conf/httpd.conf

# service freeswitch start
# service httpd start
# service mysqld start

设置Bluebox访问数据库
mysqladmin -u root password 'kissmysql'
mysql -u root -p

 mysql> CREATE USER 'bluebox'@'127.0.0.1' IDENTIFIED BY 'bluebox';
 mysql> CREATE DATABASE bluebox;
 mysql> GRANT ALL ON bluebox.* TO 'bluebox'@'127.0.0.1';
 mysql> FLUSH PRIVILEGES;

安装bluebox
cd /var/www/html

git clone git://source.2600hz.org/bluebox.git
chown -R freeswitch:freeswitch /var/www/html/bluebox
cd bluebox
./preinstall.sh

备注: 当安装的时候提示你web用户名默认值从"apache" 改为 "freeswitch",其他的任何东西都保持默认值,这个时候相互要不停地按“ENTER”确认键就行了。

安装完成后,重启 httpd,浏览网页 http://xxx.xxx.xxx.xxx/bluebox (这里的 xxx.xxx.xxx.xxx 就是你的bluebox服务器的IP地址就可以完成安装。

原文地址:https://www.cnblogs.com/cnsanshao/p/2754703.html