How To Install FreePBX 15 On Ubuntu 18.0410 min read
FreePBX is an opensource ip telephony system. Now I am share how to install FreePBX 15 on Ubuntu 18.04. I am share this manually installation process for FreePBX 15. So lets start this process.
★ Check Web Site URL From Zabbix Server
★ Check Apache Tomcat Service From Zabbix Server With Gmail Notification
- Server IP address : 10.66.50.30
- Server OS : Ubuntu 18.04 LTS
- RAM : 2 GB
- Disk : 50 GB
- CPU : 2
- CPU op-mode(s): 64-bit
Must be ping from your server to 8.8.8.8
Step #01: Install all below package for prerequisite FreePBX 15.
root@FreePBX-Server:~# 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 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 php-mbstring sendmail -y
Step #02: After complete previous command then install nodejs for FreePBX 15.
root@FreePBX-Server:~# curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash - root@FreePBX-Server:~# apt-get install -y nodejs root@FreePBX-Server:~# reboot
Step #03: Download & extract asterisk 16 for install FreePBX 15.
root@FreePBX-Server:~# cd /usr/src/ root@FreePBX-Server:/usr/src/# wget https://wiki.freepbx.org/download/attachments/122487323/mariadb-connector-client-library_3.0.8-1_amd64.deb root@FreePBX-Server:/usr/src/# wget https://wiki.freepbx.org/download/attachments/122487323/mariadb-connector-odbc_3.0.7-1_amd64.deb root@FreePBX-Server:/usr/src/# dpkg -i mariadb-connector-client-library_3.0.8-1_amd64.deb root@FreePBX-Server:/usr/src/# dpkg -i mariadb-connector-odbc_3.0.7-1_amd64.deb root@FreePBX-Server:/usr/src/# pear install Console_Getopt root@FreePBX-Server:/usr/src/# wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-16-current.tar.gz root@FreePBX-Server:/usr/src/# wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz root@FreePBX-Server:/usr/src/# wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-current.tar.gz root@FreePBX-Server:/usr/src/# tar xvfz dahdi-linux-complete-current.tar.gz root@FreePBX-Server:/usr/src/# rm -f dahdi-linux-complete-current.tar.gz
Step #04: DAHDI and LIBPRI install for FreePBX 15.
root@FreePBX-Server:/usr/src/# cd dahdi-linux-complete-* root@FreePBX-Server:/usr/src/dahdi-linux-complete-3.0.0+3.0.0# make all root@FreePBX-Server:/usr/src/dahdi-linux-complete-3.0.0+3.0.0# make install root@FreePBX-Server:/usr/src/dahdi-linux-complete-3.0.0+3.0.0# make config root@FreePBX-Server:/usr/src/dahdi-linux-complete-3.0.0+3.0.0# cd /usr/src root@FreePBX-Server:/usr/src/# tar xvfz libpri-current.tar.gz root@FreePBX-Server:/usr/src/# rm -f libpri-current.tar.gz root@FreePBX-Server:/usr/src/# cd libpri-* root@FreePBX-Server:/usr/src/libpri-1.6.0# make root@FreePBX-Server:/usr/src/libpri-1.6.0# make install
Download dependency package
root@FreePBX-Server:/usr/src/libpri-1.6.0# cd root@FreePBX-Server:/# wget https://raw.githubusercontent.com/asterisk/third-party/master/jansson/2.12/jansson-2.12.tar.bz2 -P /tmp/ root@FreePBX-Server:/# wget https://www.pjsip.org/release/2.8/pjproject-2.8.tar.bz2 -P /tmp/
Step #05: Install asterisk 16 for FreePBX 15.
root@FreePBX-Server:/usr/src/libpri-1.6.0# cd /usr/src root@FreePBX-Server:/usr/src/# tar xvfz asterisk-16-current.tar.gz root@FreePBX-Server:/usr/src/# rm -f asterisk-16-current.tar.gz root@FreePBX-Server:/usr/src/# cd asterisk-* root@FreePBX-Server:/usr/src/asterisk-16.3.0# contrib/scripts/get_mp3_source.sh root@FreePBX-Server:/usr/src/asterisk-16.3.0# contrib/scripts/install_prereq install root@FreePBX-Server:/usr/src/asterisk-16.3.0# ./configure --with-pjproject-bundled --with-jansson-bundled root@FreePBX-Server:/usr/src/asterisk-16.3.0# make menuselect root@FreePBX-Server:/usr/src/asterisk-16.3.0# menuselect/menuselect --enable app_macro --enable format_mp3 menuselect.makeopts root@FreePBX-Server:/usr/src/asterisk-16.3.0# make root@FreePBX-Server:/usr/src/asterisk-16.3.0# make install root@FreePBX-Server:/usr/src/asterisk-16.3.0# make config root@FreePBX-Server:/usr/src/asterisk-16.3.0# ldconfig root@FreePBX-Server:/usr/src/asterisk-16.3.0# update-rc.d -f asterisk remove
Step #06: Add asterisk user and setup asterisk permission for install FreePBX 15.
root@FreePBX-Server:/usr/src/asterisk-16.3.0# cd root@FreePBX-Server:~# useradd -m asterisk root@FreePBX-Server:~# chown asterisk. /var/run/asterisk root@FreePBX-Server:~# chown -R asterisk. /etc/asterisk root@FreePBX-Server:~# chown -R asterisk. /var/{lib,log,spool}/asterisk root@FreePBX-Server:~# chown -R asterisk. /usr/lib/asterisk root@FreePBX-Server:~# rm -rf /var/www/html root@FreePBX-Server:~# sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php/7.2/apache2/php.ini root@FreePBX-Server:~# cp /etc/apache2/apache2.conf /etc/apache2/apache2.conf_orig root@FreePBX-Server:~# sed -i 's/${APACHE_RUN_USER}/asterisk/' /etc/apache2/apache2.conf root@FreePBX-Server:~# sed -i 's/${APACHE_RUN_GROUP}/asterisk/' /etc/apache2/apache2.conf root@FreePBX-Server:~# sed -i 's/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf root@FreePBX-Server:~# a2enmod rewrite root@FreePBX-Server:~# systemctl restart apache2
Note: If can’t asterisk user & group into apache2.conf file so manually add this two lines.
root@FreePBX-Server:~# vi /etc/apache2/apache2.conf
Insert below two lines into this file. The save it.
User asterisk Group asterisk
Press Esc :wq press Enter.
root@FreePBX-Server:~# systemctl restart apache2
Step #07: Create odbc file for install FreePBX 15.
Just copy below test and past into your terminal.
cat <<EOF > /etc/odbcinst.ini [MySQL] Description = ODBC for MySQL (MariaDB) Driver = /usr/local/lib/libmaodbc.so FileUsage = 1 EOF
Then press Enter
Step #08: Create another odbc file for asterisk report.
Just copy below test and past into your terminal.
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 EOF
Then press Enter
Step #09: Download FreePBX 15 and install using below command.
root@FreePBX-Server:~# cd /usr/src root@FreePBX-Server:/usr/src# wget http://mirror.freepbx.org/modules/packages/freepbx/freepbx-15.0-latest.tgz root@FreePBX-Server:/usr/src# tar vxfz freepbx-15.0-latest.tgz root@FreePBX-Server:/usr/src# rm -f freepbx-15.0-latest.tgz root@FreePBX-Server:/usr/src# touch /etc/asterisk/{modules,cdr}.conf root@FreePBX-Server:/usr/src# cd freepbx root@FreePBX-Server:/usr/src/freepbx# ./start_asterisk start root@FreePBX-Server:/usr/src/freepbx# ./install -n
Now wait for installation process completed. After complete this process then browse your server ip address and create admin account.
Step #10: When login using admin account then update your module. Please see video for details.
- Click Apply Config on the top right corner when completed loading.
- Goto Admin manu click Module Admin.
- Click Check online.
- Click Download all.
- Click Process.
- Goto bottom click Confirm. Now you see all package start download and install.
- Click Return.
- Finally click Apply Config on the top right corner.
Now enjoy your FreePBX server. 🙂
If any error please see my YouTube channel for update video.
- How To Install Zabbix Server 6.4 On AlmaLinux 8 Server - August 9, 2024
- How To Clear RAM Memory Cache Buffer Linux Server - February 29, 2024
- How To Install Apache Cloud Stack Management Server 4.17 On Ubuntu 22.04 - February 1, 2024
We really appreciate for your support for buying me a coffee.
It takes us a while to compose and upload new content, as they have to be checked to see if Properly works. We appreciate you if you help me for one cup of coffee to keep us awake and always deliver good quality content.
No contribution is small of an amount. We are grateful for any amount you support us with. Thank you!
Error when you run the command “dpkg -i mariadb-connector-odbc_3.0.7-1_amd64.deb” even in your video, how to fix that please?
Thanks. What you problem face for this error. Please tell me details.
I also got an error after all did and done …..the error I got was apache could not start on this server
Goto vi /etc/apache2/apache2.conf
Add below lines into apache conf file
User asterisk
Group asterisk
Then restrat apache server
root@pbx:/usr/src/freepbx# ./install -n
Assuming you are Database Root
Checking if SELinux is enabled…Its not (good)!
Reading /etc/asterisk/asterisk.conf…Done
Checking if Asterisk is running and we can talk to it as the ‘asterisk’ user…Yes. Determined Asterisk version to be: 16.6.0
Checking if NodeJS is installed and we can get a version from it…sh: 1: node: not found
NodeJS 8 or higher is not installed. This is now a requirement
root@pbx:/usr/src/freepbx# ip r
default via 172.25.150.3 d
Now this post updated. Try again. If any error please comment below.
Thanks.
I am getting this also, I followed the guide above and Asterisk already running with user asterisk
root@pbx:/usr/src/freepbx# ps aux|grep asterisk
root 4053 0.0 0.0 4628 1092 pts/0 S 00:32 0:00 /bin/sh /usr/sbin/safe_asterisk -U asterisk -G asterisk
asterisk 5990 0.0 0.0 2073580 4800 ? Sl 00:38 0:00 /usr/sbin/apache2 -k start
asterisk 5991 0.0 0.0 2073580 4800 ? Sl 00:38 0:00 /usr/sbin/apache2 -k start
root 6341 0.0 0.0 4628 1104 pts/0 S
What is error? if can’t start Apache service so read of Step #06 last step.
Thanks.
Hey, Admin
./install -n
Assuming you are Database Root
Checking if SELinux is enabled…Its not (good)!
Reading /etc/asterisk/asterisk.conf…Done
Checking if Asterisk is running and we can talk to it as the ‘asterisk’ user…Yes. Determined Asterisk version to be: 16.9.0
Checking if NodeJS is installed and we can get a version from it…Yes. Determined NodeJS version to be: 8.10.0
Preliminary checks done. Starting FreePBX Installation
Please help me, Thank you !
Must be disable any firewall like selinux or other then reboot your server. I think this is fix.
Thanks.
When i put:
sudo cat < /etc/odbcinst.ini
[MySQL]
Description = ODBC for MySQL (MariaDB)
Driver = /usr/local/lib/libmaodbc.so
FileUsage = 1
EOF
the command line response me with:
-bash: /etc/odbcinst.ini: Permission denied
Can you help me with that?
you are not sudoers user. So you can’t run this command. if possible use root or sudoers user.
Thanks.
to enable Restore from a legacy system, you need to add this install:
sudo apt install php-sqlite3
Which FreePBX version for this?
Thanks.
FreePBX Version 15 on Ubuntu 18.04. — Using the instruction on this page.
The only thing that did not work was the restore of a legacy backup of “raspbx” (IE: FreePBX version 14) I think.
You can manual backup system.
Thanks.
please tell me how to fix this ? root@ubuntuserver:/home/faycalserver# asterisk -rvvvvv
Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)
i followed ur tutorial with every letter. can u pls tell me whats the matter?
Please check carefully again. this guide is tested from me many times.
Thanks.
Thank you for this great Guide
Welcome!
I just followed the above instructions. It works almost all functions. But CDR reports is not working. How can I solve the issue? any clues ?
Please wait I am checking. Maybe odbc problem.
Thanks.
Checking if SELinux is enabled…Its not (good)!
Reading /etc/asterisk/asterisk.conf…Error!
Unable to read /etc/asterisk/asterisk.conf or it was missing a directories section
Must be disable selinux then reboot your server then try to installation command.
Thanks.
eading state information… Done
Package linux-headers-4.15.0-147-generic is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
Use apt apdate && apt upgrade -y
goto https://biztosnet.com/dpkg-was-interrupted-you-must-manually-run-dpkg-configure-a-to-correct-the-problem/
And find solution #2.
Thanks.