Manual installations of FreePBX is considered an EXPERTS ONLY exercise. This method of installation is enough to get CORE functionality of FreePBX. Non-commercial modules may not function as expected or detailed in the Wiki's. Certain modules and features may require additional software to be installed and configured on the server.
**** COMMERCIAL MODULES CANNOT BE INSTALLED ON THIS OS ****
Do not use the 18.04.1 '-live' ISO image as it has significant, and critical bugs. If you do so, you will need to run the 'Is my installation buggy' fix. Make sure you do not use a -live, image, and instead use an ISO from the cdimages repository.
For Asterisk 16 you must enable app_macro in make menuselect
Initial System Setup
Nothing unusual is required when installing the machine, excepted to install openssh-server to accomplish the first step.
Note that this installation guide installs PHP 5.6. PHP 7 and higher is NOT SUPPORTED on FreePBX 14, and is provided on a best-effort basis. FreePBX Framework 184.108.40.206 and higher may install successfully with PHP 7, but it is not recommended.
Log in as, or switch to, the Root User
THIS IS IMPORTANT! You must run the entire process as root. Attempting to use 'sudo' later on will not work. Please don't ignore this.
It will be helpful to enable ssh logins as root. To do so, you need to enable the 'PermitRootLogin' line in /etc/ssh/sshd_config. You can do this with the following commands:
Check if your installation is buggy
There is an issue with Ubuntu 18.04.1 installing incorrectly - See this ticket for more information. Run the command '
grep backports /etc/apt/sources.list' and if it does not return anything, you need to run the fix that we supplied in comment 27. Note that this forces the use of the US mirrors. If you're not in the US (eg, if you're in Australia), you can change the URLs from 'us.archive' to 'au.archive', by doing something like
sed -i 's/us.archive/au.archive/' /etc/apt/sources.list which will speed up your upgrades and installations dramatically.
Update Your System
Now that you have ensured your machine is functioning correctly, you can proceed with the installation (and don't forget, you must run all of this as root). Start by installing the PHP 5.6 repository, and doing a complete update.
Note that this uses an older PHP 5.6. FreePBX 15 supports PHP 7.1 and higher.
As part of this install, you may be asked (possibly several times) for a mysql password. DO NOT SET A MYSQL PASSWORD AT THIS POINT. Your machine will automatically generate a secure password later in the installation.
When prompted for Email configuration, make sure you set this correctly! Most machines will select 'Internet with smarthost', and use the SMTP server of your internet provider.
Fix permissions for the Asterisk user
Remove any 'sample' config files left over, and fix errors
These are a security vulnerability and must be removed before installing freepbx. There is also an incompatibility in the Ubuntu-supplied asterisk.conf which needs to be fixed.
Update Apache configuration
Fix 'Pear-GetOpt' compatibility issue.
The standard 'pear-getopt' uses 'each' which is Deprecated in PHP 7. This simple patch fixes it
Install MySQL ODBC Connector
The MySQL ODBC connector is used for CDRs.
Download and install package
Note that this assumes you haven't previously configured ODBC on this machine. If so, you will need to manually add the required data.
Fix Ubuntu/Debian Paths
Debian and Ubuntu use /usr/share/asterisk for things like MOH and Sounds. As sounds are now controlled by FreePBX, you need to delete the system sounds, and link them to the correct location.
Download and Install FreePBX 14.
If an error appears after install, then check php verison.
To downgrade it, launch this cmd line:
# sudo a2dismod php7.x
# sudo a2enmod php5.6
# sudo update-alternatives --set php /usr/bin/php5.6
# sudo service apache2 restart
You've done it!
You can now start using FreePBX. Open up your web browser and connect to the IP address or hostname of your new FreePBX server. You will see the Admin setup page, which is where you set your 'admin' account password, and configure an email address to receive update notifications.
Install additional modules
There are (at the time of writing) approximately 50 additional modules that can be installed to enhance the usability of your FreePBX machine - you can install these individually via Module Admin, or, you can simply run '
fwconsole ma installall' to download and install all the additional modules available.
We hope you enjoy using FreePBX 14!
Please note you need to set up FreePBX to start asterisk (and it's associated services) on bootup. You can view an example systemd startup script here.