这个我自己装完以后发现freepbx页面虽然出来了,但是还有一些错误,所以这个我就放弃了,你们可以参考上面的安装freePBX的ISO版本,跟这个是一样的,不过要新建虚拟机的
1:更新系统
yum -y update
yum groupinstall core
yum groupinstall base
2:安装需要依赖的包
yum
install
gcc gcc-c++ bison mysql-devel mysql-server php php-mysql php-pear php-mbstring tftp-server httpd
make
ncurses-devel libtermcap-devel sendmail sendmail-cf caching-nameserver sox newt-devel libxml2-devel libtiff-devel audiofile-devel gtk2-devel subversion kernel-devel git subversion kernel-devel php-process
3:安装PearDB
yum search pear
yum install php-pear
pear install DB
4:重新启动服务器
reboot
5:安装谷歌语音的依赖包
cd
/usr/src
wget https:
//iksemel
.googlecode.com
/files/iksemel-1
.4.
tar
.gz
tar
xf iksemel-1.4.
tar
.gz
cd
iksemel-1.4
.
/configure
make
make
install
6:因为asterisk在此之前讲过安装了,这里我们就pass
7:FreePBX的安装和配置
首先自己在网上下FreePBX版本
tar zxvf freepbx-2.11.0rcl(版本的名字)
cd freepbx-2.11.0rcl
8:现在创建用户并设置Asterisk的所有权权限。
adduser asterisk -M -c
"Asterisk User"
chown
asterisk.
/var/run/asterisk
chown
-R asterisk.
/etc/asterisk
chown
-R asterisk.
/var/
{lib,log,spool}
/asterisk
chown
-R asterisk.
/usr/lib/asterisk
mkdir
/var/www/html
chown
-R asterisk.
/var/www/
9:一些小的修改Apache的
sed
-i
's/\(^upload_max_filesize = \).*/\120M/'
/etc/php
.ini
cp
/etc/httpd/conf/httpd
.conf
/etc/httpd/conf/httpd
.conf_orig
sed
-i
's/^\(User\|Group\).*/\1 asterisk/'
/etc/httpd/conf/httpd
.conf
service httpd restart
10:Asterisk配置在MYSQL的数据库。
export
ASTERISK_DB_PW=amp109
mysqladmin -u root -p create asteriskcdrdb
mysql -u root -p asteriskcdrdb < SQL/cdr_mysql_table.sql
mysqladmin -u root -p create asterisk
mysql -u root -p asterisk < SQL/newinstall.sql
mysql -u root -p asteriskcdrdb < SQL/cdr_mysql_table.sql
mysqladmin -u root -p create asterisk
mysql -u root -p asterisk < SQL/newinstall.sql
11:设置MYSQL数据库权限。
mysql -u root -p
GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY '${ASTERISK_DB_PW}';
GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY '${ASTERISK_DB_PW}';
flush privileges;
quit
12:重新启动Asterisk和运行FreePBX的安装脚本
.
/start_asterisk
start
.
/install_amp
如果运行
.
/install_amp
没成功,试下
.
/install_amp
--username=asteriskuser --password=$ASTERISK_DB_PW
出现的画面是:
13:停止asterisk
asterisk -rx "core stop now"
14:删除文件将被替换链接
rm -f /etc/asterisk/ccss.conf
rm -f /etc/asterisk/confbridge.conf
rm -f /etc/asterisk/extensions.conf
rm -f /etc/asterisk/features.conf
rm -f /etc/asterisk/iax.conf
rm -f /etc/asterisk/logger.conf
rm -f /etc/asterisk/sip.conf
rm -f /etc/asterisk/sip_notify.conf
rm -f /etc/asterisk/confbridge.conf
rm -f /etc/asterisk/extensions.conf
rm -f /etc/asterisk/features.conf
rm -f /etc/asterisk/iax.conf
rm -f /etc/asterisk/logger.conf
rm -f /etc/asterisk/sip.conf
rm -f /etc/asterisk/sip_notify.conf
15:amportal启动
amportal start
httpd启动
service httpd start
接下来,你就可以打开你的web网页登陆了,如果mysql在本地,那就输入http://localhost
然后输入默认的用户名:admin 密码:admin
如果你在进入页面的时候看到asterisk报错,那你就修改下/etc/sysconfig/selinux这个文件
改下SELINUX=disabled
如果你不是这个错,那你看下页面报什么错误,会不会是asterisk没有启动?
然后重启服务器