Installing FreePBX 15 on Debian 9.6
READ FIRST
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 ****
For Asterisk 16 you must enable app_macro in make menuselect
- 1.1 Initial System Setup
- 1.1.1 Log in as, or switch to, the Root User
- 1.1.2 Update Your System
- 1.1.3 Install Required Dependencies
- 1.1.4 Install nodejs
- 1.1.5 Reboot server
- 1.2 Install Prerequisites
- 1.2.1 Install MariaDB ODBC
- 1.2.2 Install Legacy pear requirements
- 1.2.3 MariaDB Warning!
- 1.3 Install and Configure Asterisk
- 1.4 Install and Configure FreePBX
- 1.1 Initial System Setup
- 2 Automatic Startup
Initial System Setup
When installing the machine, at package selection make sure you pick - at least - 'web server' and 'SSH server'. You can also turn off 'Debian desktop environment'.
Log in as, or switch to, the Root User
Please note: 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. You must run this entire installer as the root user. If will be helpful to enable ssh logins as root. To do so, you need to change the line 'PermitRootLogin without-password' to 'PermitRootLogin yes' in /etc/ssh/sshd_config. You can do this with the following commands.
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
service sshd restart |
Update Your System
apt-get update && apt-get upgrade -y |
Install Required Dependencies
apt-get install -y build-essential linux-headers-`uname -r` openssh-server apache2 mariadb-server\
mariadb-client bison flex php php-curl php-cli php-pdo php-mysql php-pear php-gd php-mbstring php-intl\
curl sox libncurses5-dev libssl-dev mpg123 libxml2-dev libnewt-dev sqlite3\
libsqlite3-dev pkg-config automake libtool autoconf git unixodbc-dev uuid uuid-dev\
libasound2-dev libogg-dev libvorbis-dev libicu-dev libcurl4-openssl-dev libical-dev libneon27-dev libsrtp0-dev\
libspandsp-dev sudo subversion libtool-bin python-dev unixodbc dirmngr sendmail-bin sendmail\ |
Install nodejs
Reboot server
Install Prerequisites
After you machine has rebooted, you are now sure you're running the latest Linux kernel. (At the time of writing this document, the Kernel supplied was 3.16.)
Install MariaDB ODBC
mariadb-connector-odbc_3.0.7-1_amd64.deb
mariadb-connector-client-library_3.0.8-1_amd64.deb
ODBC connector seems to be already present in mariadb-connector-client-library_3.0.8-1_amd64.deb
Install Legacy pear requirements
MariaDB Warning!
If the MariaDB server works in 'STRICT_TRANS_TABLES' mode you need to chage mode in my.conf
to
or
Let's check mode login in mysql -u freepbxuser -p(the_password) :
Thanks Astashov_Alexey
Install and Configure Asterisk
Download Asterisk source files.
Compile and install DAHDI.
If you don't have any physical PSTN hardware attached to this machine, you don't need to install DAHDI.(For example, a T1 or E1 card, or a USB device). Most smaller setups will not have DAHDI hardware, and this step can be safely skipped.
Compile and install Asterisk
After selecting 'Save & Exit' you can then continue
Install and Configure FreePBX
Create the Asterisk user and set base file permissions.
A few small modifications to Apache.
Configure ODBC
Edit /etc/odbcinst.ini and add the following. Note that this command assumes you are installing to a new machine, and that the file is empty. If this is not a freshly installed machine, please manually verify the contents of the file, rather than just copying and pasting the lines below. The 'EOF' does no go in the file, it simply signals to the 'cat' command that you have finished pasting.
You may need to verify these paths, if you're not on a x86_64 machine. You can use the command `find / -name libmyodbc.so` to verify the location
Edit or create /etc/odbc.ini and add the following section. Note that, again, this command assumes you are installing to a new machine, and the file is empty. Please manually verify the contents of the files if this is not the case.
Download and install FreePBX.
If you want to install Freepbx in another web root (e.g: under /var/www/myroot) , modify some Apache settings and restart it.
Install all Freepbx modules
That's 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.
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 via Module Admin.
We hope you enjoy using FreePBX 15!
Automatic Startup
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.