freepbx_测试成功
- 格式:docx
- 大小:18.30 KB
- 文档页数:4
一、安装环境1、CentOS6.32、Asterisk1.6.23、Freebpx2.8二、在asterisk基础上安装freepbx1、下载相关软件和包/pub/asterisk/releases/asterisk-sounds-1.2.1.tar.gz/freepbx-2.9.0.tar.gz/sourceforge/lame/lame-3.97.tar.gz二、开始安装相关包1、安装asterisk-addons[root@cspbx asterisk-addons-1.6.2.2]# ./configure[root@cspbx asterisk-addons-1.6.2.2]# make[root@cspbx asterisk-addons-1.6.2.2]# make install[root@cspbx asterisk-addons-1.6.2.2]# make samples2、安装asterisk-sounds[root@cspbx asterisk-sounds-1.2.1]# make install三、安装freepbx所需组件及相关包1、安装lame[root@cspbx lame-3.97]# ./configure[root@cspbx lame-3.97]# make[root@cspbx lame-3.97]# make install2、安装freepbx的准备工作安装freepbx需要的五个密码password1--- root密码Password2---asterisk数据库密码Password3---freepbx管理员密码Password4---freepbx运营面板密码Password5---asterisk录音接口密码四、安装freepbx1、创建数据库[root@cspbx freepbx-2.9.0]# mysqladmin -uroot –pmysqlpass create asterisk #创建asterisk数据库[root@cspbx freepbx-2.9.0]# mysqladmin -uroot 123 create asteriskcdrdb #创建cdr 数据库[root@cspbx freepbx-2.9.0]# mysql -uroot -pmysqlpass asterisk <SQL/newinstall.sql #导入数据表[root@cspbx freepbx-2.9.0]# mysql -uroot -pmysqlpass asteriskcdrdb <SQL/newinstall.sql #导入2、创建数据库用户[root@cspbx freepbx-2.9.0]# mysql –uroot -pmysqlpassmysql> GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskpbx@localhost IDENTIFIED BY 'passowrd2';mysql> GRANT ALL PRIVILEGES ON asterisk.* TO asteriskpbx@localhost IDENTIFIED BY'passowrd2';mysql> flush privileges;3、创建用户及相应的用户权限[root@cspbx freepbx-2.9.0]# useradd -c "Asterisk PBX" -d /var/lib/asterisk asterisk[root@cspbx freepbx-2.9.0]# chown -R asterisk:asterisk /var/run/asterisk[root@cspbx freepbx-2.9.0]# chown -R asterisk:asterisk /var/log/asterisk[root@cspbx freepbx-2.9.0]# chown -R asterisk:asterisk /var/lib/php/session4、修改apache主配置文件[root@cspbx freepbx-2.9.0]# sed -i "s/User apache/User asterisk/" /etc/httpd/conf/httpd.conf [root@cspbx freepbx-2.9.0]# sed -i "s/Group apache/Group asterisk/" /etc/httpd/conf/httpd.conf [root@cspbx freepbx-2.9.0]# sed -i "s/AllowOverride None/AllowOverride All/" /etc/httpd/conf/httpd.conf5、启动asterisk服务[root@cspbx freepbx-2.9.0]# ./start_asterisk start6、安装freepbx[root@cspbx freepbx-2.9.0]# ./install_amp --username=asteriskpbx --password=password2 Checking for PEAR DB..FAILEDPHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Chongqing' for 'CST/8.0/no DST' instead in /home/pro/asterisk/freepbx-2.9.0/amp_conf/htdocs/admin/libraries/utility.functions.php on line 71[FATAL] PEAR must be installed (requires DB.php). Include path: .:/usr/share/pear:/usr/share/php PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Chongqing' for 'CST/8.0/no DST' instead in /home/pro/asterisk/freepbx-2.9.0/amp_conf/htdocs/admin/libraries/utility.functions.php on line 71问题处理方法:[root@cspbx freepbx-2.9.0]# pear install dbWARNING: "pear/DB" is deprecated in favor of "pear/MDB2"WARNING: channel "" has updated its protocols, use "pear channel-update " to updatedownloading DB-1.7.14.tgz ...Starting to download DB-1.7.14.tgz (133,103 bytes)................done: 133,103 bytesinstall ok: channel:///DB-1.7.14[root@cspbx freepbx-2.9.0]# vim /etc/php.ini修改date.timezone = PRCroot@cspbx freepbx-2.9.0]# ./install_amp --username=root --password=mysqlpassChecking for PEAR DB..OKChecking for PEAR Console::Getopt..OKUsing username: rootUsing password: *********Checking user..OKChecking if Asterisk is running..running with PID: 1563..OKChecking for /etc/amportal.conf../etc/amportal.conf does not exist, copying default Creating new /etc/amportal.confEnter your USERNAME to connect to the 'asterisk' database:[asteriskpbx] asteriskpbx 填入连接asterisk数据库的用户名Enter your PASSWORD to connect to the 'asterisk' database:[password2] password2 填入连接asterisk数据库的密码Enter the hostname of the 'asterisk' database:[localhost] localhostEnter a USERNAME to connect to the Asterisk Manager interface:[admin] adminEnter a PASSWORD to connect to the Asterisk Manager interface:[amp111] password3Enter 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] 填入本机IPEnter a PASSWORD to perform call transfers with the Flash Operator Panel:[passw0rd] password4Use simple Extensions [extensions] admin or separate Devices and Users [deviceanduser]? [extensions]Enter directory in which to store AMP executable scripts:[/var/lib/asterisk/bin]Enter directory in which to store super-user scripts:[/usr/local/sbin]/etc/amportal.conf writtenAssuming new install, --install-moh added to command line OKReading /etc/amportal.conf..OKChecking for /etc/asterisk/asterisk.conf..OKReading /etc/asterisk/asterisk.conf..OKUsing asterisk as PBX EngineChecking for Asterisk version..1.6.2.13Checking for selinux..OKConnecting to database..OK进入安装完成7、修改[root@cspbx freepbx-2.9.0]# vim /etc/amportal.conf# Default Value: databaseAUTHTYPE=database# Default Value:ARI_ADMIN_USERNAME=admin# User Portal Admin Password# Default Value: ari_passwordARI_ADMIN_PASSWORD=password1Optionally, you can turn off the FOP completely by changing the following settings. FOPRUN=falseFOPDISABLE=true[root@cspbx ~]# echo "/usr/local/sbin/amportal start" >>/etc/rc.local[root@cspbx freepbx-2.9.0]# chown -R asterisk:asterisk /var/www/html[root@cspbx freepbx-2.9.0]#reboot。