Installing FreePBX 16 on Debian 10.9 Asterisk 16 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 ****
Installing FreePBX 16 on Debian 10.9 For Asterisk 16 you must enable app_macro in make menuselect
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
apt-get update && apt-get upgrade -y |
apt-get install gnupg2 -y |
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources .list.d /php7 .x.list apt-get update && apt-get upgrade -y |
apt-get install -y build-essential linux-headers-` uname -r` openssh-server apache2 mariadb-server\ mariadb-client bison flex php7.4 php7.4-curl php7.4-cli php7.4-common php7.4-mysql php7.4-gd php7.4-mbstring\ php7.4-intl php7.4-xml php-pear 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 libsrtp2-dev\ libspandsp-dev sudo subversion libtool-bin python-dev unixodbc dirmngr sendmail-bin sendmail\ |
sudo apt-get install -y nodejs |
reboot |
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 4.19.0-16.)
libssl1.0.2_1.0.2u-1_deb9u4_amd64.deb – This is the dependency for mariadb-connector-odbc.
mariadb-connector-odbc_3.0.7-1_amd64.deb
cd /usr/src/ wget https: //wiki .freepbx.org /download/attachments/122487323/mariadb-connector-odbc_3 .0.7-1_amd64.deb |
If the MariaDB server works in ‘STRICT_TRANS_TABLES’ mode you need to change mode in /etc/mysql/my.conf
[mysqld] sql_mode=NO_ENGINE_SUBSTITUTION, STRICT_TRANS_TABLES |
to
[mysqld] sql_mode=NO_ENGINE_SUBSTITUTION |
or
[mysqld] sql_mode= '' |
Let’s check mode login in mysql :
MariaDB [(none)]> SELECT @@SQL_MODE, @@GLOBAL.SQL_MODE; |
apt-get install linux-headers-$( uname -r) |
cd /usr/src |
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.
wget http: //downloads .asterisk.org /pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current . tar .gz |
cd /usr/src tar xvfz dahdi-linux-complete-current. tar .gz rm -f dahdi-linux-complete-current. tar .gz cd dahdi-linux-complete-* make all make install make install -config cd /usr/src tar xvfz libpri-current. tar .gz rm -f libpri-current. tar .gz cd libpri-* make make install |
Some scripts will have you enable CORE-SOUNDS and EXTRA-SOUNDS but this is unnecessary on FreePBX as the Sound Languages module will do this for you
cd /usr/src tar xvfz asterisk-16-current. tar .gz rm -f asterisk-16-current. tar .gz cd asterisk-* contrib /scripts/get_mp3_source .sh contrib /scripts/install_prereq install . /configure --with-pjproject-bundled --with-jansson-bundled make menuselect.makeopts |
make make install make config ldconfig update-rc.d -f asterisk remove |
useradd -m asterisk chown asterisk. /var/run/asterisk chown -R asterisk. /etc/asterisk chown -R asterisk. /var/ {lib,log,spool} /asterisk chown -R asterisk. /usr/lib/asterisk rm -rf /var/www/html |
sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php/7 .4 /apache2/php .ini cp /etc/apache2/apache2 .conf /etc/apache2/apache2 .conf_orig sed -i 's/^\(User\|Group\).*/\1 asterisk/' /etc/apache2/apache2 .conf sed -i 's/AllowOverride None/AllowOverride All/' /etc/apache2/apache2 .conf a2enmod rewrite service apache2 restart |
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.
cat <<EOF > /etc/odbcinst .ini [MySQL] Description = ODBC for MySQL (MariaDB) Driver = /usr/local/lib/libmaodbc .so FileUsage = 1 EOF |
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.
cat <<EOF > /etc/odbc .ini [MySQL-asteriskcdrdb] Description = MySQL connection to 'asteriskcdrdb' database Driver = MySQL Server = localhost Database = asteriskcdrdb Port = 3306 Socket = /var/run/mysqld/mysqld .sock Option = 3 EOF |
cd /usr/src tar vxfz freepbx-16.0-latest.tgz rm -f freepbx-16.0-latest.tgz touch /etc/asterisk/ {modules,cdr}.conf cd freepbx . /start_asterisk start . /install -n |
If you want to install Freepbx in another web root (e.g: under /var/www/myroot) , modify some Apache settings and restart it.
cd /usr/src tar vxfz freepbx-16.0-latest.tgz rm -f freepbx-16.0-latest.tgz touch /etc/asterisk/ {modules,cdr}.conf cd freepbx . /start_asterisk start . /install --webroot= /var/www/myroot -n sed -i 's/\/var\/www\/html/\/var\/www\/myroot/g' /etc/apache2/sites-available/000-default .conf sed -i 's/\/var\/www\/html/\/var\/www\/myroot/g' /etc/apache2/sites-available/default-ssl .conf service apache2 restart |
fwconsole ma disablerepo commercial fwconsole ma installall fwconsole ma delete firewall fwconsole reload fwconsole restart |
FreePBX 16 on Debian 10.9 Asterisk 16 – 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 16!
Digital marketing can be defined by SEO XOOM is as marketing your product and service on any digital platform including Google Search, Social Media and Whats-app. Remember, online success comes from partnering with an experienced digital marketing company and choosing a mix of digital platforms that best suit your marketing goals.