FreePBX official install guide is here.
Note that if you don't have the required base OS you will get an error like this at the end of the install
2024-10-23 00:30:22 - Upgrading FreePBX 17 modules
2024-10-23 00:30:22 - Installation failed at step Upgrading FreePBX 17 modules. Please check log /var/log/pbx/freepbx17-install-2024.11.05-00.14.36.log for details.
2024-10-23 00:30:22 - Error at line: 1135 exiting with code 255 (last command was: fwconsole ma upgradeall >> $log)
2024-10-23 00:30:22 - Exiting script
#log
In modulefunctions.class.php line 2814:
preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated
moduleadmin [-f|--force] [-d|--debug] [--edge] [--ignorecache] [--stable] [--color] [--skipchown] [-e|--autoenable] [--skipdisabled] [--snapshot SNAPSHOT] [--format FORMAT] [-R|--repo REPO] [-t|--tag TAG] [--skipbreakingcheck] [--sendemail] [--onlystdout] [--] [
2024-10-23 00:30:22 - ****** INSTALLATION FAILED *****
2024-10-23 00:30:22 - Installation failed at step Upgrading FreePBX 17 modules. Please check log /var/log/pbx/freepbx17-install-2024.11.05-00.14.36.log for details.
2024-10-23 00:30:22 - Error at line: 1135 exiting with code 255 (last command was: fwconsole ma upgradeall >> $log)
2024-10-23 00:30:22 - Exiting script
wget https://github.com/FreePBX/sng_freepbx_debian_install/raw/master/sng_freepbx_debian_install.sh
bash sng_freepbx_debian_install.sh
The install took about 20 minutes for me on a single core Xeon on an SSD.
If successful it should look like this at the end:
______ ______ ______ __ __
| ___| | ___ \| ___ \\ \ / /
| |_ _ __ ___ ___ | |_/ /| |_/ / \ V /
| _| | '__| / _ \ / _ \| __/ | ___ \ / \
| | | | | __/| __/| | | |_/ // /^\ \
\_| |_| \___| \___|\_| \____/ \/ \/
NOTICE! You have 4 notifications! Please log into the UI to see them!
Current Network Configuration
+-----------+-------------------+---------------------------+
| Interface | MAC Address | IP Addresses |
+-----------+-------------------+---------------------------+
| ens3 | | |
| | | fe80::dcad:beff:feef:6e79 |
+-----------+-------------------+---------------------------+
Please note most tasks should be handled through the GUI.
You can access the GUI by typing one of the above IPs in to your web browser.
For support please visit:
http://www.freepbx.org/support-and-professional-services
+---------------------------------------------------------------------+
| This machine is not activated. Activating your system ensures that |
| your machine is eligible for support and that it has the ability to |
| install Commercial Modules. |
| |
| If you already have a Deployment ID for this machine, simply run: |
| |
| fwconsole sysadmin activate deploymentid |
| |
| to assign that Deployment ID to this system. If this system is new, |
| please go to Activation (which is on the System Admin page in the |
| Web UI) and create a new Deployment there. |
+---------------------------------------------------------------------+
fwconsole firewall help
Valid Commands:
disable : Disable the System Firewall. This will shut it down cleanly.
stop : Stop the System Firewall
start : Start (and enable, if disabled) the System Firewall
restart : Restart the System Firewall
lerules [enable] or [disable] : Enable or disable Lets Encrypt rules.
trust : Add the hostname or IP specified to the Trusted Zone
untrust : Remove the hostname or IP specified from the Trusted Zone
list [zone] : List all entries in zone 'zone'
add [zone] [id id id..] : Add to 'zone' the IDs provided.
del [zone] [id id id..] : Delete from 'zone' the IDs provided.
listzones : Show zones that can be used to add and del.
fix_custom_rules : Create the files for the custom rules if they don't exist and set the permissions and owners correctly.
sync : Synchronizes all selected zones of the firewall module with the intrusion detection whitelist.
f2bstatus or f2bs : Display ignored and banned IPs. (Only root user).
When adding or deleting from a zone, one or many IDs may be provided.
These may be IP addresses, hostnames, or networks.
Example:
fwconsole firewall add trusted 10.46.80.0/24 hostname.example.com 1.2.3.4
Note that the firewall in production should never be disabled as there are massive amounts of hackers that target FreePBX and SIP servers. This can be used for learning, but ideally the firewall should be configured to whitelist yourself or other trusted IPs, rather than completely disabling.
If you are locked out:
Change 192.168.1.0/24 to your subnet or IP
iptables -I INPUT -s 192.168.1.0/24 -j ACCEPT
systemctl stop fail2ban
This buys time before the firewall reactivates.
This happens if you try the near impossible by using an older/different Debian
The current script as of 2024-10-11 has a bug where they pass -S to add-apt-repository when it must be a lower case -s which breaks everything as you can see in the log:
esolving deb.freepbx.org (deb.freepbx.org)... 52.217.40.28, 54.231.128.57, 52.217.9.44, ...
Connecting to deb.freepbx.org (deb.freepbx.org)|52.217.40.28|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3139 (3.1K) [binary/octet-stream]
Saving to: 'STDOUT'
0K ... 100% 19.4M=0s
2024-10-11 21:52:03 (19.4 MB/s) - written to stdout [3139/3139]
Usage: add-apt-repository
add-apt-repository is a script for adding apt sources.list entries.
It can be used to add any repository and also provides a shorthand
syntax for adding a Launchpad PPA (Personal Package Archive)
repository.
- The apt repository source line to add. This is one of:
a complete apt line in quotes,
a repo url and areas in quotes (areas defaults to 'main')
a PPA shortcut.
a distro component
Examples:
apt-add-repository 'deb http://myserver/path/to/repo stable myrepo'
apt-add-repository 'http://myserver/path/to/repo myrepo'
apt-add-repository 'https://packages.medibuntu.org free non-free'
apt-add-repository http://extras.ubuntu.com/ubuntu
apt-add-repository ppa:user/repository
apt-add-repository ppa:user/distro/repository
apt-add-repository multiverse
If --remove is given the tool will remove the given sourceline from your
sources.list
add-apt-repository: error: no such option: -S
This can be fixed by editing the bash installer file you downloaded and changing -S to -s
install, freepbx, linux, debian, ubuntu, mint, guidefreepbx, execute, offcial, sangoma, maker, asterisk, wget, https, github, sng_freepbx_debian_install, sh, impressively, doesn, ll, performing, installation, tftp, pxe, amd, smp, _, gnu, refer, var, pbx, sane, exiting, apt, update, vi, etc, sources, bash, tmp, default, configuration, installing, software, properties, installed, successfully, repositories, login, gui, installer, repository, esolving, deb, org, connecting, http, awaiting, ok, length, binary, octet, stream, stdout, mb, usage, adding, entries, provides, shorthand, syntax, launchpad, ppa, archive, quotes, repo, url, areas, defaults, shortcut, distro, component, examples, myserver, myrepo, packages, medibuntu, extras, user, multiverse, sourceline, editing, downloaded,