接上部:CentOS 5.8 asterisk-1.8.10.1 安装之一:安装,添加蓝牙支持,添加AMR-NB audio codec
参考: CentOS 5.8 Aasterisk 1.8 rc2 安装freepbx
http://blog.csdn.net/jianghao616/article/details/6059658环境:
CentOS 5.8
asterisk-1.8.10.1
2. 安装 phpmyadmin,可选
注意:CentOS 5.8里面的php是5.1版本的(php -v),phpmyadmin 3版本需要php 5.2。所以这里我们就用phpmyadmin 2.11好了
下载 phpMyAdmin-2.11.11.2-english.zip=================================================================================================================
四:安装FreePBX
这个必须在asterisk 完全安装后才能装
下载地址:可以到 http://www.freepbx.org(官方)
wget http://mirror.freepbx.org/freepbx-2.9.0.tar.gz
# tar -xvf freepbx-2.9.0.tar.gz
# cd freepbx-2.9.0
# ./start_asterisk start
这里要注意的是。首先我们必须吧mysql密码设置为空,方便运行以下命令(建立相关asterisk 数据库)
/etc/init.d/mysqld start
mysql -u root -ppassw0rd
mysql> set password for root@localhost=password('');
mysql> exit;
mysql -u root (测试可以空口令登录)
# mysqladmin create asterisk
# mysqladmin create asteriskcdrdb
# mysql asterisk < SQL/newinstall.sql
# mysql asteriskcdrdb < SQL/cdr_mysql_table.sql
# mysql
mysql> GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY 'passw0rd';
mysql> GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY 'passw0rd';
mysql> flush privileges;
mysql> quit;
好了,现在我们又得把mysql密码设置不能为空( mysqladmin -u root password "passw0rd" ),方便运行以下命令
# ./install_amp --username=root --password=passw0rd //这里我的mysql用名为root,密码是passw0rd
Checking for PEAR DB..OK
Checking for PEAR Console::Getopt..OK
Using username: root
Using password: ********
Checking user..OK
Checking if Asterisk is running..running with PID: 4173..OK
Checking for /etc/amportal.conf../etc/amportal.conf does not exist, copying defa
ult
Creating new /etc/amportal.conf
Enter your USERNAME to connect to the 'asterisk' database:
[root]
Enter your PASSWORD to connect to the 'asterisk' database:
[passw0rd]
Enter the hostname of the 'asterisk' database:
[localhost]
Enter a USERNAME to connect to the Asterisk Manager interface:
[admin]
Enter a PASSWORD to connect to the Asterisk Manager interface:
[amp111]
Enter the path to use for your AMP web root:
[/var/www/html]
Enter the IP ADDRESS or hostname used to access the AMP web-admin:
[xx.xx.xx.xx] asterisk18
Enter a PASSWORD to perform call transfers with the Flash Operator Panel:
[passw0rd]
Use simple Extensions [extensions] admin or separate Devices and Users [devicean
duser]?
[extensions]
Created /var/lib/asterisk/bin
Enter directory in which to store super-user scripts:
[/usr/local/sbin]
# echo "/usr/local/sbin/amportal start" >> /etc/rc.local
# chkconfig httpd on
# chkconfig mysqld on
OK 安装完成 # reboot
chmod 777 /var/www/html -R
cd /var/lib/asterisk/
chmod 777 bin
chmod -R 777 bin/*
chmod 777 /var/lib/php/session/
chmod 777 -R /var/lib/php/session/*
http://192.168.100.128
缺省用户名口令为admin/admin
第一次登陆管理界面,需要apply configuration
============================================================
现在你可以创建SIP号码,trunk了
============================================================
排错:日志:
tail -f /var/log/httpd/access_log
tail -f /var/log/httpd/error_log
/var/log/mysqld.log
asterisk 日志
tail -f /var/log/asterisk/full
tail -f /var/log/asterisk/freepbx.log
排错:检查数据访问
mysql -h localhost -u root -ppassw0rd
use asterisk;
排错:
http://192.168.158.134/phpmyadmin/
============================================================
提示:
/etc/amportal.conf
控制谁能用amp 管理协议访问asterisk服务器
/etc/asterisk/manager.conf
freepbx 忘记密码的解决办法:按照文章修改口令为freepbx后,登录FreePBX Administration页面并修改口令。
http://hi.baidu.com/qiqi7036/item/a83f10cda2ef1416b67a2422