安装了asterisk (asterisk安装见本博客中找)后,我们需要一套方便管理的asterisk的后台,那么我个人freepbx是非常好的一套管理软件
...............................................................................................................................................................................................
*Web Server (Web服务器)........................rpm -q httpd
*Mail Server (邮件服务器).........................rpm -q sendmail
*MySQL Database (mysql数据库).....................rpm -q mysql
*Development Tools (开发工具)......这个在安装centos的时候是有选择的安装该服务了(见CentOs安装)
二:禁用Selinux
这个是安全级别和防火墙的东东西,启用会影响我们的freepbx的安装,没多大P用,禁用它:
# cd /etc/sysconfig
# vi selinux
把 #SELINUX=enforcing
改成 #SELINUX=disabled
保存, :wq 最好重启下 # reboot
三:安装需要的扩展包
1:yum install e2fsprogs-devel keyutils-libs-devel krb5-devel libogg libselinux-devel libsepol-devel libxml2-devel libtiff-devel gmp php-pear php-pear-DB php-gd php-mysql php-pdo kernel-devel ncurses-devel audiofile-devel libogg-devel openssl-devel mysql-devel zlib-devel perl-DateManip sendmail-cf sox (我也不知道这是什么东东,官方提供的,以后在慢慢研究)
2:安装 lame
# wget http://easynews.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz
# tar zxvf lame-3.97.tar.gz
# cd lame-3.97
# ./configure
# make
# make install
四:安装FreePBX
这个必须在asterisk 完全安装后才能装,asterisk的安装这里不说了。(asterisk安装见本博客中找)
下载地址:可以到 http://www.freepbx.org(官方)或到 http://bbs.voip88.com 去下载,我用滴版本是 freepbx-2.5.1
# tar zxvf freepbx-2.5.1.tar.gz
# cd freepbx-2.5.1
# ./start_asterisk start
这里要注意的是。首先我们必须吧mysql密码设置为空,方便运行以下命令(建立相关asterisk 数据库)
# mysqladmin create asterisk
# mysqladmin create asteriskcdrdb
# mysql asterisk < SQL/newinstall.sql
# mysql asteriskcdrdb < SQL/cdr_mysql_table.sql
# mysql
# GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY ‘SOMEPASSWORD’
# GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY ‘SOMEPASSWORD’
# flush privileges
# /q
好了,现在我们又得把mysql密码设置不能为空,方便运行以下命令
# ./install_amp --username=root --password=888888 //这里我的mysql用名为root,密码是888888
# echo “/usr/local/sbin/amportal start” >> /etc/rc.local
# chkconfig httpd on
# chkconfig mysqld on
OK 安装完成 # reboot
要注意的是可能打开 pbx的时候 ,无法访问==。。 这就是linux下的权限问题。
如:给 /var/www/html 下的 admin / 加权限 chmod 755或 777 admin 及 amportal.conf 的权限
...............................................................................................................................................................................................
[ERROR] retrieve_op_conf_from_mysql.pl returned with an error code 13 PHP Warning: fopen(/etc/asterisk/queues_additional.conf): failed to open stream: Permission denied in /var/lib/asterisk/bin/libfreepbx.confgen.php on line 253
...............................................................................................................................................................................................
详细请参考官方文档:http://www.freepbx.org/support/documentation/installation/install-process-for-centos-5-1
...............................................................................................................................................................................................