Also cdr_mysql module has been deprecated so FreePBX 2.11 adds support for the ODBC method. This install guide adds configurations to enable the new method. You can continue to use the old method for as long as the cdr_mysql module is included in Asterisk and still functional.Tested on CentOS 6.4. Step 10: Installing Asterisk and PBX in a Flash. Install you will see the status screen come up you will need to scroll to the button and click 'return' to get back to Free PBX. Then click 'Apply Config' Step 35: setup end point manager. Step 41: Set your phones to the right TFTP server. FreePBX is a web-based open source GUI (graphical user interface) that controls and manages Asterisk (PBX), an open source communication server. Learn how to install a web and database server, email, FTP client or other applications. Installing Asterisk on the router is easier now as current OpenWrt trunk build(the one we use) includes prebuilt Asterisk binaries. As always, since OpenWrt is designed to work with / not /opt, some adjustment is required to get Asterisk working properly. Freepbx GUI pear install db-1.7.14 VERSION=12.0 USERNAME=asteriskuser PASSWORD=amp109 service mysqld start mysqladmin create asterisk mysqladmin create asteriskcdrdb mysql -e 'GRANT ALL PRIVILEGES ON asterisk.*. Installing Cdr In Free Pbx Distro. Read our FreePBX setup tutorial for a. 2006-12-10 16:51###Installing freePBX###freePBX. By itself, FreePBX won't do. Running as root (#) user and not a limited account ($) user. Optionally edit /etc/default/grub and change GRUB. Create tftp configuration file. It can cause problems that will.
Learning has never been so easy!
I will show you how to setup a PBX in a flash system from start to finish.
42 Steps total
Step 1: Downloading the ISO
http://sourceforge.net/projects/pbxinaflash/files/
In this how to we are going to use the most up to date system. At the time of writing it is 2.0.6.5.0-CentOS-6.5
In this how to we are going to use the most up to date system. At the time of writing it is 2.0.6.5.0-CentOS-6.5
Step 2: System setup
In my how to I have am going to be using a VM with a 20 gig hard drive and 512 of ram single core CPU. PBX in a Flash can run on many systems from VMs to dedicated servers with as little as 512mb to 128 gb of ram and 20 gb hard to 10 TB. With a CPU of single core 1 ghz to 12 core 4.5 ghz. It just comes down to your needs the more phones you have the more power you will need.
*NOTE your system needs network and internet access to download files*
*NOTE your system needs network and internet access to download files*
Step 3: Mounting your ISO
Whatever way you want to do USB drive or CD/DVD. If using the USB drive you need this software to work with CentOS http://iso2usb.sourceforge.net/
Step 4: Pick your install drivers
Here you need to pick your drivers that need to be installed with PBX in a Flash 'Install PIAF *RECOMMENDED*' will work %90 of the time.
Step 5: Time Zone
Yes I did add this step. I am in EST / America/New York.
Step 6: Root Password
Okay you need to add a password here that is (I recommend) great then 6 characters with at lest 2 caps and 2 number.
Step 7: Waiting.......
Here you will wait for the system to install the needed package. I would say here is where you get on spiceworks watercooler, get a snack or work on tickets. *This is not the lunch time break.*
Your system will reboot.
Step 8: Login
When you system comes back from the reboot it will ask you for your login
Step 9: Continue with the install
Here you need to continue with the install by hitting A
Step 10: Installing Asterisk and PBX in a Flash
This is where you system need internet as it will download and install the needed/update packages.
Highlight 'PIAF Installs PBX in a Flash Server *Asterisk only*'
then press enter
Highlight 'PIAF Installs PBX in a Flash Server *Asterisk only*'
then press enter
Step 11: Legal stuff
Just say yes. to both screens
Step 12: Pick your color
Here you need to pick your color for install I like Purple the best.
NOTE if your colors say *UNAVAILABLE* then your system can not find the internet.
NOTE if your colors say *UNAVAILABLE* then your system can not find the internet.
Step 13: Downloading and install updates/packages for PBX
Many screens are going to pass by just let them. The installer is just doing its job.
Step 14: Installer
Here you will see 2 screens you need to hit enter on here is one of this.
Step 15: Advanced configuration
Enable advanced configuration = N
This is for the pros of Asterisk there is no support here.
This is for the pros of Asterisk there is no support here.
Step 16: Verify
You want to continue with out using a menuconfig.
You want to tap Y
You want to tap Y
Step 17: Time Zone for PHP
You need to setup a timezone for PHP
Step 18: selecting time zone
Here you need to pick your time zone. I used 2 for EST.
Step 19: Verify timezone for PHP
Tap Y
Step 20: Pick your FreePBX
Here always pick latest version.
so tap 3
so tap 3
Step 21: Are you sure?
Tap the Y key to verify you want to install that version of freePBX
Step 22: Password for you web login
Here you need to make a password for Maint,wwwadmin,meetme.
Step 23: Password
If you forget your password you will have to reinstall.
Step 24: To use my own password or not to ?
Here you will be asked if you want the installer to generate you a password or you want to use your own.
Step 25: Make your own password
Enter in your password here.
Step 26: Review your install
Here it will show what you picked for your PBX in a Flash config.
Step 27: Lunch break
Your system is going to have a lot of screen pass by again this is going to be a great time to take your lunch break.
Step 28: Login to the webased portal
In your console your system will give you the DHCP address enter that address into a web browser you will see the following screen.
Step 29: Admin
Click the Users/Admin switch to show this screen then click on 'FreePBX Administration'
Step 30: Username and password
The username you need is maint password is the one you picked in step 24/25.
Step 31: Module Admin
To install end point manager goto Admin - Module Admin
Step 32: Now you have Module Admin screen up
You need to mark Basic Extended Commercial Then check 'Check Online'
Step 33: Mark OSS end point manager for install
When you click 'Check online' Your screen will refresh and now scroll down to Connectivity then to 'OSS PBX End Point Manager' mark this for Download and install. Then scroll to the top of the page to 'Process' and click it.
Step 34: Status of install
After confirming you install you will see the status screen come up you will need to scroll to the button and click 'return' to get back to Free PBX. Then click 'Apply Config'
Step 35: setup end point manager.
Goto Connectivity - OSS Endpoint Advanced Settings
That will bring you to this screen where you need to enter the IP address of your phone system If you wish to set your IP address to a static address enter in that address here. then follow this tutorial to change it in CentOS http://www.cyberciti.biz/faq/linux-configure-a-static-ip-address-tutorial/
That will bring you to this screen where you need to enter the IP address of your phone system If you wish to set your IP address to a static address enter in that address here. then follow this tutorial to change it in CentOS http://www.cyberciti.biz/faq/linux-configure-a-static-ip-address-tutorial/
You need to add a NTP server for the phones to get there time.
Scroll down and click 'Update Globales'
Scroll down and click 'Update Globales'
Step 36: Updates on End Point Configuration
Head to Connectivity - OSS End Point Configuration.
Click the 'Check for Updates' button
Click the 'Check for Updates' button
Step 37: Find your phone make/model
In this setup we are going to be using a Polycom SoundPoint IP 430 SIP
We are going to click on the 'Install' next to polycom your page will refresh then find your model and click 'Install Firmware' the page will refresh then scroll back down to the phone and click 'Enable'
We are going to click on the 'Install' next to polycom your page will refresh then find your model and click 'Install Firmware' the page will refresh then scroll back down to the phone and click 'Enable'
Step 38: Adding an Extension.
Goto Applications - Extensions
You will see a page like this and you need to keep your device to 'Generic SIP Device' then click submit.
You will see a page like this and you need to keep your device to 'Generic SIP Device' then click submit.
Step 39: Setup of extension
On this page you need to setup your extension
Basic things that need to be enter are
User Extension
Display Name
Scroll down and hit Submit then Apply Config.
Basic things that need to be enter are
User Extension
Display Name
Scroll down and hit Submit then Apply Config.
You can setup other let voicemail, Call recording, and so on.
NOTE!! Do not put in the phones MAC here as this only works about 50% of the time.
Step 40: Set the Extension to the phone.
Head to Connectivity - OSS End Point Device List.
In the Mac address field fill in the mac address of phone you wish to config. then add the make and model of that phone from the drop downs. then click Add.
In the Mac address field fill in the mac address of phone you wish to config. then add the make and model of that phone from the drop downs. then click Add.
Step 41: Set your phones to the right TFTP server
On the polycom I am using for this how to your goto
Reboot the phone Click Setup password should be 456
then goto 'Server Menu'
Mark 'Server Type' as 'Trivial FTP'
'Server Address' Should be your PBX IP address.
Then save and reboot.
Reboot the phone Click Setup password should be 456
then goto 'Server Menu'
Mark 'Server Type' as 'Trivial FTP'
'Server Address' Should be your PBX IP address.
Then save and reboot.
Step 42: Phone
Your phone should reboot and install the new firmware and config files. In the device list you see a Green light next to get.
You should now know how to install and add phone to PBX in a Flash.
References
- PBX in a Flash
5 Comments
- SerranoAITech Mar 30, 2014 at 11:02pmI just went through this process a few days ago, it's nice to confirm I got the steps right! Thanks for taking the time to write this out, with screenshots and everything. Unfortunately I'm using SNOM phones and not Polycom phones, otherwise this is pretty much identical.
I wish I understood the differences in the colors, I can't seem to locate a good reference for that. Perhaps I'll go post a question. :) - SerranogitClaus Jun 25, 2014 at 08:03pmWe are looking at switching to this in the near future. I will definitely be referencing this if we do. Thanks for posting.
- Pimientosamadebo Jan 16, 2015 at 11:19pmThe PIAF community is just like an oasis in the Asterisk 'new-time' desert. and your outlines and screendhots are fantastically precise and to the point. thanks and keep it up...
- Pimientodavewegener Aug 28, 2015 at 02:57pmThis is great.. very helpful. Except that the folks at PBXiaf have moved the goalposts YET AGAIN, redoing how the install works, how the configs are made, and of course all the references are handled...IF you're on 6.5 but NOT the 64bit version, this should still work...
- JalapenoSVITPRO May 24, 2017 at 12:06amInstall went fine, however, when I clicked on the 'incredible PBX Administration', I get a page not found error. Any idea?
yum grouplist installed
Installed Groups:
DNS Name Server
Editors
Legacy Network Server
Mail Server
Network Servers
System Tools
Text-based Internet
Web Server
Windows File Server
Yum Utilities
DNS Name Server
Editors
Legacy Network Server
Mail Server
Network Servers
System Tools
Text-based Internet
Web Server
Windows File Server
Yum Utilities
yum groupremove '
DNS Name Server'yum groupremove 'Editors'
yum groupremove 'Legacy Network Server'
yum groupremove 'Mail Server'
yum groupremove 'Network Servers'
yum groupremove 'System Tools'
yum groupremove 'Text-based Internet'
yum groupremove 'Web Server'
yum groupremove 'Windows File Server'
Now update the base install
yum -y update
Install Asterisk/FreePBX required packages, other useful packages, and their dependencies
yum groupinstall core
yum groupinstall base
yum groupinstall base
yum install gcc gcc-c++ wget bison mysql-devel mysql-server php php-mysql php-pear php-pear-DB php-mbstring nano tftp-server httpd make ncurses-devel libtermcap-devel sendmail sendmail-cf caching-nameserver sox newt-devel libxml2-devel libtiff-devel php-gd audiofile-devel gtk2-devel subversion nano kernel-devel selinux-policy
RHEL v5 NOTES:
Skip this section if you are using a RHEL6 distribution.
Skip this section if you are using a RHEL6 distribution.
On RHEL 5 shutdown unnecessary daemon brcm-iscsi which is enabled by default and tends to do a lot of logging even when not used. This creates unnecessary I/O load.
chkconfig iscsi off
chkconfig iscsid off
service iscsi stop
service iscsid stop
chkconfig iscsid off
service iscsi stop
service iscsid stop
Replace syslog with the improved and backwards compatible rsyslog (standard in RHEL6 but not RHEL5). This also prevents a problem that comes up with improper timestamps in /var/log/secure when you get disconnects.
NOTE:This is only for RHEL5 based systems. You do not need to do this for RHEL6.
yum -y install rsyslog
chkconfig syslog off
chkconfig rsyslog on
service syslog stop
service rsyslog start
chkconfig syslog off
chkconfig rsyslog on
service syslog stop
service rsyslog start
--END of RHEL v5 NOTES--
RHEL v6 NOTES:
Skip this section if you are using a RHEL5 based distribution.
RHEL v6 NOTES:
Skip this section if you are using a RHEL5 based distribution.
On RHEL v6 and it's clone distributions the php-pear-DB package is not included. You need to download it from an official mirror and install otherwise the FreePBX install will fail. Click the link to check for the latest version.
cd /usr/src
wget http://dl.fedoraproject.org/pub/epel/6/i386/php-pear-DB-1.7.13-3.el6.noarch.rpm
wget http://dl.fedoraproject.org/pub/epel/6/i386/php-pear-DB-1.7.13-3.el6.noarch.rpm
rpm -ivh php-pear-DB*
RHEL v6 uses a newer version of php. In this version php-posix is no longer in php-common, it is in php-process. So you need to install php-process if using RHEL v6 or it's clones otherwise the FreePBX install will fail.
yum -y install php-process
Check if the firewall (iptables) is enabled by default and if the RHEL v6 default configuration blocks the FreePBX web GUI. If you know what services/ports are required you can run 'system-config-firewall-tui' and configure the firewall as required.
At a minimum, the following ports need to be opened:
TCP 80 (www)
TCP 4445 (Flash Operator Panel)
UDP 5060-5061 (SIP)
UDP 10,000 - 20,000 (RTP)
UDP 4569 (IAX)
TCP 80 (www)
TCP 4445 (Flash Operator Panel)
UDP 5060-5061 (SIP)
UDP 10,000 - 20,000 (RTP)
UDP 4569 (IAX)
Another option is to remove existing settings from the firewall and save.
iptables -F
service iptables save
iptables -F
service iptables save
Alternatively, you can disable the firewall for now and prevent it from starting on reboot.
service iptables stop
chkconfig iptables off
chkconfig iptables off
--END of RHEL v6 NOTES--
Selinux is not required or recommended. This will create the required file if it does not already exist. If it already exists copy paste or edit the contents indicated here to be sure selinux never runs.
Selinux is not required or recommended. This will create the required file if it does not already exist. If it already exists copy paste or edit the contents indicated here to be sure selinux never runs.
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
(Ctrl-x> y >Enter)
Make sure selinux is turned off for this session
setenforce 0
TFTP
Enable the tftp server on startup if required (for configuring phones)
nano /etc/xinetd.d/tftp
change server_args = from '-s /var/lib/tftpboot' to '-s /tftpboot'
change “disable=yes” to “disable=no”
(Ctrl-X>y>ENTER)
nano /etc/xinetd.d/tftp
change server_args = from '-s /var/lib/tftpboot' to '-s /tftpboot'
change “disable=yes” to “disable=no”
(Ctrl-X>y>ENTER)
mkdir /tftpboot
chmod 777 /tftpboot
service xinetd restart
chmod 777 /tftpboot
service xinetd restart
Set Timezone
Copy your timezone from this link
Copy your timezone from this link
System timezone
Create a symbolic link to the appropriate timezone from /etc/localtime.
Example:
ln -sf /usr/share/zoneinfo/America/Vancouver /etc/localtime
Create a symbolic link to the appropriate timezone from /etc/localtime.
Example:
ln -sf /usr/share/zoneinfo/America/Vancouver /etc/localtime
PHP timezone (required since PHP v5.3):
if not set and using php v5.3+ (the version included with RHEL6) it will revert to the default timezone which may not be the correct one depending on your location. The FreePBX install will throw out a bunch of warnings if you are using RHEL 6 and don't set this.
if not set and using php v5.3+ (the version included with RHEL6) it will revert to the default timezone which may not be the correct one depending on your location. The FreePBX install will throw out a bunch of warnings if you are using RHEL 6 and don't set this.
for RHEL5:
nano +633 /etc/php.ini
for RHEL6
nano +946 /etc/php.ini
Uncomment (;) date.timezone = and add your timezone
nano +633 /etc/php.ini
for RHEL6
nano +946 /etc/php.ini
Uncomment (;) date.timezone = and add your timezone
service httpd restart
Memory Limit
The recommended setting is 128M otherwise you may get warnings in FreePBX. RHEL 5 installs will probably already have this set correctly. RHEL 6 may need to have this changed.
For RHEL 5
nano +302 /etc/php.ini
memory_limit = 128M
nano +302 /etc/php.ini
memory_limit = 128M
For RHEL 6
nano +457 /etc/php.ini
memory_limit = 128M
nano +457 /etc/php.ini
memory_limit = 128M
As always after php.ini changes, apache needs to be restarted for the changes to take effect.
service httpd restart
Download and untar source files. Zaptel/Dahdi is not included in this install procedure. Starting with Asterisk 1.6.2/FreePBX2.9, it is possible to use ConfBridge in place of MeetMe conferencing. Meetme conferencing was the last Asterisk application that required a timing source. The only reason to install zaptel/dahdi now is if you are installing telephony hardware. Meetme still has some features that confbridge does not and is still required if you also require paging. To install meetme conferencing you must install dahdi and ensure meetme is selected during the asterisk menuselect installation part of the procedure. You can also install confbridge but FreePBX will default to use MeetMe if it detects it.
service httpd restart
Download and untar source files. Zaptel/Dahdi is not included in this install procedure. Starting with Asterisk 1.6.2/FreePBX2.9, it is possible to use ConfBridge in place of MeetMe conferencing. Meetme conferencing was the last Asterisk application that required a timing source. The only reason to install zaptel/dahdi now is if you are installing telephony hardware. Meetme still has some features that confbridge does not and is still required if you also require paging. To install meetme conferencing you must install dahdi and ensure meetme is selected during the asterisk menuselect installation part of the procedure. You can also install confbridge but FreePBX will default to use MeetMe if it detects it.
Get FreePBX. Check if this is the latest released version.
cd /usr/src
wget http://mirror.freepbx.org/freepbx-2.10.0.tar.gz
tar zxvf freepbx-2.10.0.tar.gz
cd /usr/src
wget http://mirror.freepbx.org/freepbx-2.10.0.tar.gz
tar zxvf freepbx-2.10.0.tar.gz
Get Asterisk v1.8.
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-1.8-current.tar.gz
tar zxvf asterisk-1.8-current.tar.gz
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-1.8-current.tar.gz
tar zxvf asterisk-1.8-current.tar.gz
NOTE: There is no separate asterisk addons package to download starting with Asterisk v1.8
cd /usr/src/asterisk-1.8*
make clean
./configure && make menuselect
make clean
./configure && make menuselect
Select all addons. I believe these are all needed or recommended for FreePBX. Select base and addon sounds. I suggest ulaw as they sound better than gsm especially if you are using ulaw as your default codec. I usually just check both. Then make sure to press the 'save' button afterwards.
When you select 'format_mp3' above as an addon you must run a script before going any further otherwise the install will fail.
./contrib/scripts/get_mp3_source.sh
You must also have subversion installed to run the above script and be in the root directory of the Asterisk source code.
Now install Asterisk. NOTE: If upgrading Asterisk on an already running FreePBX system do NOT run make samples.
make && make install && make samples
Create user. May already exist but just to make sure
useradd -c 'Asterisk PBX' -d /var/lib/asterisk asterisk
useradd -c 'Asterisk PBX' -d /var/lib/asterisk asterisk
The following directory may already exist but just to make sure
mkdir /var/run/asterisk
mkdir /var/run/asterisk
Set ownership
chown -R asterisk /var/run/asterisk
chown -R asterisk /var/log/asterisk
chown -R asterisk /var/lib/asterisk/moh
chown -R asterisk /var/lib/php/session
chown -R asterisk /var/run/asterisk
chown -R asterisk /var/log/asterisk
chown -R asterisk /var/lib/asterisk/moh
chown -R asterisk /var/lib/php/session
Pbx In A Flash
Music on Hold
The Asterisk default moh directory is '/moh' and the Freepbx default moh directory is '/mohmp3'. If we create a symbolic link instead everything is in one place and can still be found by both FreePBX and Asterisk. FreePBX uses mohmp3 by default so moh just sits there unused if we do not create a symbolic link. You can switch between these two moh directories in the new Advanced Settings GUI. I still include this symbolic link procedure for legacy reasons. If you do it everything is in one directory always no matter what. That simplifies things and simpler is often better.
ln -s /var/lib/asterisk/moh /var/lib/asterisk/mohmp3
The Asterisk default moh directory is '/moh' and the Freepbx default moh directory is '/mohmp3'. If we create a symbolic link instead everything is in one place and can still be found by both FreePBX and Asterisk. FreePBX uses mohmp3 by default so moh just sits there unused if we do not create a symbolic link. You can switch between these two moh directories in the new Advanced Settings GUI. I still include this symbolic link procedure for legacy reasons. If you do it everything is in one directory always no matter what. That simplifies things and simpler is often better.
ln -s /var/lib/asterisk/moh /var/lib/asterisk/mohmp3
The new default behaviour for Asterisk and Freepbx is to only use wav files for moh due to transcoding overhead and Asterisk stability issues with mp3's. So we want to install mpg123 for converting uploaded mp3's to wav automagically. If you won't be uploading or streaming mp3's or won't be using FreePBX (new) default behaviour then you probably don't need to install mpg123.
cd /usr/src
wget http://sourceforge.net/projects/mpg123/files/mpg123/1.14.2/mpg123-1.14.2.tar.bz2/download
tar -xjvf mpg123-1.14.2.tar.bz2
wget http://sourceforge.net/projects/mpg123/files/mpg123/1.14.2/mpg123-1.14.2.tar.bz2/download
tar -xjvf mpg123-1.14.2.tar.bz2
cd mpg123-1.14.2
./configure && make && make install
./configure && make && make install
Freepbx php script cannot find mpg123 by default so we need to create a symbolic link.
ln -s /usr/local/bin/mpg123 /usr/bin/mpg123
ln -s /usr/local/bin/mpg123 /usr/bin/mpg123
CHANGE APACHE USER
Change User apache and Group apache to User asterisk and Group asterisk.
sed -i 's/User apache/User asterisk/' /etc/httpd/conf/httpd.conf
sed -i 's/Group apache/Group asterisk/' /etc/httpd/conf/httpd.conf
sed -i 's/Group apache/Group asterisk/' /etc/httpd/conf/httpd.conf
MYSQL SETUP
Before you can do anything to MySQL, you need to make sure it's running:
NOTE: If running RHEL/CENTOS/SL 6 you may need to run this first.
mysql_install_db
Try without and see if it starts first.
NOTE: If running RHEL/CENTOS/SL 6 you may need to run this first.
mysql_install_db
Try without and see if it starts first.
service mysqld start
Initializing MySQL database: [ OK ]
Starting MySQL: [ OK ]
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'
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.10.0
mysqladmin create asterisk
mysqladmin create asteriskcdrdb
mysql asterisk < SQL/newinstall.sql
mysql asteriskcdrdb < SQL/cdr_mysql_table.sql
mysqladmin create asterisk
mysqladmin create asteriskcdrdb
mysql asterisk < SQL/newinstall.sql
mysql asteriskcdrdb < SQL/cdr_mysql_table.sql
They also need to be secured. FreePBX will prompt you for a database username/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 Freepbx. If you use these well know defaults and your server is not firewalled make sure to set bind-address = 127.0.0.1 further down in this procedure so that MySQL only listens to localhost. Or better yet do both.
Security check: It's very important to check that Allow Login With DB Credentials is set to FALSE in FreePBX Advanced Settings GUI. This is the default setting. If it were set to TRUE and you were using the default credentials ofasteriskuser/amp109 and your FreePBX GUI were exposed to the internet (ie. the http port), anyone could log into yourFreePBX GUI as administrator using those credentials.
MySQL creates a test database and 2 anonymous user accounts by default which we don't need so first we delete them. MySQL also creates a non-local root@hostname account and assuming you don't want to access the database remotely as root (other than via SSH) you should probably delete that for security reasons. DO NOT DELETE the root@localhost account.
mysql
mysql> DROP DATABASE test;
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
mysql> SHOW VARIABLES LIKE 'hostname';
+---------------+----------------+
| Variable_name | Value |
+---------------+----------------+
| hostname | somehostname.com |
+---------------+----------------+
1 row in set (0.00 sec)
+---------------+----------------+
| Variable_name | Value |
+---------------+----------------+
| hostname | somehostname.com |
+---------------+----------------+
1 row in set (0.00 sec)
mysql> DROP USER '@'localhost';
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
mysql> DROP USER '@'somehostname.com';
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
mysql> DROP USER 'root'@'somehostname.com';
mysql> GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY 'amp109';
Query OK, 0 rows affected (0.00 sec)
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)
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
mysql> q
Bye
Bye
Now, after all of this, you need to pick a root 'mysql' password. We'll make it 'abcdef' just for this example. You should use a reasonably strong password. If you need to do anything else with mysql, you'll need to provide this password.
mysqladmin -u root password 'abcdef'
Install FreePBX
mysqladmin -u root password 'abcdef'
Install FreePBX
/usr/sbin/safe_asterisk
You may get a bunch of warnings, errors, and notices at this point. Don't worry about them. Hit ENTER to get a command prompt.
You may get a bunch of warnings, errors, and notices at this point. Don't worry about them. Hit ENTER to get a command prompt.
cd /usr/src/freepbx-2.10.0
./install_amp
./install_amp
If you get any warnings or errors in the last part of the output, they're usually not traumatic.
Default username is: admin
Default pw is: admin
Freepbx 2.10 now wants to create symlinks to some .conf files and complains if actual files already exist as is the case when Asterisk make samples is run. So we need to delete these files. In FreePBX 2.9 you should only have to delete sip_notify.conf and ccss.conf. Not sure what would happen if you try delete the rest. After deleting the following files, the next time we make a change in FreePBX and apply settings these symlinks will be created.
Default pw is: admin
Freepbx 2.10 now wants to create symlinks to some .conf files and complains if actual files already exist as is the case when Asterisk make samples is run. So we need to delete these files. In FreePBX 2.9 you should only have to delete sip_notify.conf and ccss.conf. Not sure what would happen if you try delete the rest. After deleting the following files, the next time we make a change in FreePBX and apply settings these symlinks will be created.
rm -f /etc/asterisk/sip_notify.conf
rm -f /etc/asterisk/iax.conf
rm -f /etc/asterisk/logger.conf
rm -f /etc/asterisk/features.conf
rm -f /etc/asterisk/sip.conf
rm -f /etc/asterisk/extensions.conf
rm -f /etc/asterisk/ccss.conf
rm -f /etc/asterisk/chan_dahdi.conf
rm -f /etc/asterisk/iax.conf
rm -f /etc/asterisk/logger.conf
rm -f /etc/asterisk/features.conf
rm -f /etc/asterisk/sip.conf
rm -f /etc/asterisk/extensions.conf
rm -f /etc/asterisk/ccss.conf
rm -f /etc/asterisk/chan_dahdi.conf
Edit /etc/asterisk/cdr_mysql.conf and add 'loguniqueid=yes' to the global section which will give each call record a unique identifier number.
nano /etc/asterisk/cdr_mysql.conf
loguniqueid=yes
set FreePBX to start on boot
echo /usr/local/sbin/amportal start >> /etc/rc.local
set FreePBX to start on boot
echo /usr/local/sbin/amportal start >> /etc/rc.local
Enable Apache and MySQL to start on boot
chkconfig httpd on
chkconfig mysqld on
chkconfig httpd on
chkconfig mysqld on
Now reboot at which point you should be able to access FreePBX with your web browser. The very first thing you need to do when you enter the FreePBX Admin GUI for the first time is 'Apply Configuration Changes' so all the *.conf files are created then reboot again or 'amportal restart' from command prompt.
You may get an error in the FreePBX GUI saying 'symlink failed for /etc/asterisk/sip_notify.conf' or something along those lines. If that is the case just delete or rename /etc/asterisk/sip_notify.conf. The next time you 'Apply Configuration Changes' in the FreePBX GUI after some change this file will be recreated and the error should be gone.
AMPORTAL.conf changes
FreePBX v2.9+ now includes an 'advanced settings' gui that is designed to replace amportal.conf and the requirements to edit it directly. There are also some settings in a new file /etc/freepbx.conf
At this point you should go into this new advanced settings GUI on the FreePBX webpage and edit the following settings:
http://IPaddressOFyourFreePBXserver/
In the GUI Go to: Tools>Advanced Administration>Advanced Settings>System Setup>User Portal Admin Password
Choose your admin password for accessing the Voicemail & Recordings (ARI) section of the front webpage.
In the same GUI go to: System Setup>FreePBX Web Address
Remove the 'xx.xx.xx.xx' and leave blank. If that does not work use your public (ie. web facing) IP address for this server.
After saving these changes by pressing the green arrow on the right hand side of each box make sure to 'Apply Configuration Changes' at the top of the GUI.