找回密码
 注册

QQ登录

只需一步,快速开始

BCM 门户 IT世界 系统管理 查看内容

FreePBX Install Guide (CentOS v5.x, Asterisk v1.6.x, FreePBX)

2011-11-6 17:50| 发布者: Test| 查看: 4738| 评论: 0|来自: PowerPBX.org

摘要: UPDATED for Asterisk v1.6.2 and FreePBX v2.8 Includes every detail in the form of step by step instructions from bare metal to a running VoIP PBX in about 2 hours. When installing Linux, do NOT inst ...

Set up MySQL

Before you can do anything to MySQL, you need to make sure it's running:

service mysqld start
Initializing MySQL database:                               [  OK  ]
Starting MySQL:                                            [  OK  ]


Now, to configure the databases for freePBX:
Note: If mysql admin password is already configured, add "-p" after the command and enter password when asked.  For example, "mysqladmin -p create asterisk"

cd /usr/src/freepbx-2.8.0
mysqladmin create asterisk
mysqladmin create asteriskcdrdb
mysql asterisk < SQL/newinstall.sql
mysql asteriskcdrdb < SQL/cdr_mysql_table.sql


They also need to be secured, so that not just anyone can access them. freePBX will prompt you for a database password when you do the install. You need to pick that now. We'll assume that you've picked 'asteriskuser' and 'amp109' - you probably shouldn't use these, as they are well known passwords for Asterisk@Home builds. If anyone's trying to attack your machine, they will try this.

mysql

mysql> GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY 'amp109';
Query OK, 0 rows affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY 'amp109';
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> \q
Bye

Now, after all of this, you need to pick a root 'mysql' password. We'll make it 'abcdef'. If you need to do anything else with mysql, you'll need to provide this password.
mysqladmin -u root password 'abcdef'


FreePBX pre-install

Build the cdr_mysql module for Asterisk (Yep, more compiling!)
cd /usr/src/asterisk-addons-1.6.2.2

make clean && ./configure && make menuselect

At menu press "x"

make && make install

Install FreePBX

/usr/sbin/safe_asterisk
cd /usr/src/freepbx-2.8.0
./install_amp
Checking for PEAR DB..OK
Checking for PEAR Console::Getopt..OK
Checking for libasteriskperl (perl bindings for asterisk)...Checking user..OK
Checking for /etc/amportal.conf../etc/amportal.conf does not exist, copying default
Creating new /etc/amportal.conf
Enter your USERNAME to connect to the 'asterisk' database: [asteriskuser]
Enter your PASSWORD to connect to the 'asterisk' database: [amp109]
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 path to use for your FOP web root:[/var/www/html/panel]
Created /var/www/html/panel
Enter the path to your Apache cgi-bin:[/var/www/cgi-bin]
Enter the IP ADDRESS or hostname used to access the AMP web-admin:[xx.xx.xx.xx] The IP Address of your Asterisk Machine
**NOTE: Leave this IP blank if you intend to access Flash Operator Panel from the Internet Enter a PASSWORD to perform call transfers with the Flash Operator Panel: [passw0rd]
Use simple Extensions [extensions] admin or separate Devices and Users [deviceanduser]? extensions
Enter directory in which to store AMP executable scripts: [/var/lib/asterisk/bin]
Created /var/lib/asterisk/bin
Enter directory in which to store super-user scripts: [/usr/sbin]
/etc/amportal.conf writtenOK
Reading /etc/amportal.conf..OK
Checking for /etc/asterisk/asterisk.conf../etc/asterisk/asterisk.conf does not exist, copying default
OK
.
.
.
OK
Please Reload Asterisk by visiting
http://XXX.XXX.XXX.XX/admin

If you get any warnings or errors in the last part of the output, they're usually not traumatic, but please use the IRC Support tool to report a bug to the developers.


The amportal script is the recommended way to stop and start asterisk:
/usr/local/sbin/amportal stop
/usr/local/sbin/amportal start

Automatic start-up
echo /usr/local/sbin/amportal start >> /etc/rc.local

FreePBX Post Install

 

Ensure services are starting at boot time and reboot
In order to access and use freePBX we will want both Apache (httpd) and MySQL (mysqld) to be started at boot. 

chkconfig httpd on
chkconfig mysqld on

You can now access freePBX with your web browser.

Edit /etc/asterisk/cdr_mysql.conf and add 'loguniqueid=yes' to the global section
nano /etc/asterisk/cdr_mysql.conf
loguniqueid=yes

To change the password for administrator "recordings" GUI (access to extension voicemail, call monitoring, recording etc.)
nano -w /var/www/html/recordings/includes/main.conf.php

$ARI_ADMIN_PASSWORD ="password"

Edit Apache web server for GUI access using a port other than 80 (optional):
nano /etc/httpd/conf/httpd.conf
change "Listen 80" to "Listen 8888" or whatever port you want

/etc/rc.d/init.d/httpd restart

Instead of accessing FreePBX by http://xxx.xxx.xxx.xxx
You now access it by
http://xxx.xxx.xxx.xxx:8888

The current default settings in FreePBX after a fresh install is no username/password required to access the GUI.  To enable the Admin password edit /etc/amportal.conf and change Authtype=none to Authtype=database.  The default username/password is admin/admin.

nano +582 /etc/php.ini
change the “max filesize” from 2M to 20M to allow larger music on hold files

 



鲜花

握手

雷人

路过

鸡蛋

相关阅读

最新评论

手机版|小黑屋|BC Morning Website ( Best Deal Inc. 001 )

GMT-8, 2026-5-27 14:23 , Processed in 0.014755 second(s), 18 queries .

Supported by Weloment Group X3.5

© 2008-2026 Best Deal Online

返回顶部