How To Install FreePBX 14 And Asterisk 14 On CentOS 716 min read
At that time FreePBX is an open source IP telephony system. So I want to show how to install FreePBX 14 And Asterisk 14 On CentOS 7 using local server or cloud server. Lets start and see my full tutorial and video. If arise any question goto footer and submit your valuable comment.
★ How To Configure Static IP address On Ubuntu 18.04
★ How To Install Zabbix Server On Ubuntu 18.04
Step #01: Disable selinux, add asterisk user and allow firewall-cmd 80 port.
[root@FreePBX-Server ~]# cat /etc/resolv.conf [root@FreePBX-Server ~]# sed -i 's/\(^SELINUX=\).*/\SELINUX=disabled/' /etc/sysconfig/selinux [root@FreePBX-Server ~]# sed -i 's/\(^SELINUX=\).*/\SELINUX=disabled/' /etc/selinux/config [root@FreePBX-Server ~]# yum -y update [root@FreePBX-Server ~]# yum -y groupinstall core base "Development Tools" [root@FreePBX-Server ~]# adduser asterisk -m -c "Asterisk User" [root@FreePBX-Server ~]# firewall-cmd --zone=public --add-port=80/tcp --permanent [root@FreePBX-Server ~]# firewall-cmd --reload
Step #02: Install database server and web server using below command for FreePBX.
[root@FreePBX-Server ~]# yum -y install lynx tftp-server unixODBC mysql-connector-odbc mariadb-server mariadb httpd ncurses-devel sendmail sendmail-cf sox newt-devel li bxml2-devel libtiff-devel audiofile-devel gtk2-devel subversion kernel-devel git crontabs cronie cronie-anacron wget vim uuid-devel sqlite-devel net-t ools gnutls-devel python-devel texinfo libuuid-devel
Step #03: Add required repo for install FreePBX 14.
[root@FreePBX-Server ~]# rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm [root@FreePBX-Server ~]# rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm [root@FreePBX-Server ~]# yum remove php*
Step #04: Install php required package for install FreePBX 14.
[root@FreePBX-Server ~]# yum install php56w php56w-pdo php56w-mysql php56w-mbstring php56w-pear php56w-process php56w-xml php56w-opcache php56w-ldap php56w-intl php56w- soap
Step #05: Start and enable some service for FreePBX 14.
[root@FreePBX-Server ~]# curl -sL https://rpm.nodesource.com/setup_12.x | bash - [root@FreePBX-Server ~]# yum install -y nodejs [root@FreePBX-Server ~]# systemctl enable mariadb.service [root@FreePBX-Server ~]# systemctl start mariadb [root@FreePBX-Server ~]# systemctl enable httpd.service [root@FreePBX-Server ~]# systemctl start httpd.service
Step #06: Download and install iksemel for FreePBX 14.
[root@FreePBX-Server ~]# cd /usr/src [root@FreePBX-Server src]# wget -c https://src.fedoraproject.org/lookaside/pkgs/iksemel/iksemel-1.4.tar.gz/md5/532e77181694f87ad5eb59435d11c1ca/iksemel-1.4.tar.gz [root@FreePBX-Server src]# tar xf iksemel-1.4.tar.gz [root@FreePBX-Server src]# cd iksemel* [root@FreePBX-Server iksemel-1.4]# ./configure [root@FreePBX-Server iksemel-1.4]# make [root@FreePBX-Server iksemel-1.4]# make install
Step #07: Download libpri and asterisk 14 for install FreePBX 14.
[root@FreePBX-Server iksemel-master]# cd /usr/src [root@FreePBX-Server src]# wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-current.tar.gz [root@FreePBX-Server src]# wget https://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-14.7.7.tar.gz [root@FreePBX-Server src]# wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz [root@FreePBX-Server src]# tar xvfz dahdi-linux-complete-current.tar.gz [root@FreePBX-Server src]# cd dahdi-linux-complete-* [root@FreePBX-Server dahdi-linux-complete-3.1.0+3.1.0]# make all [root@FreePBX-Server dahdi-linux-complete-3.1.0+3.1.0]# make install [root@FreePBX-Server dahdi-linux-complete-3.1.0+3.1.0]# make config [root@FreePBX-Server dahdi-linux-complete-3.1.0+3.1.0]# cd /usr/src [root@FreePBX-Server src]# tar xf libpri-current.tar.gz [root@FreePBX-Server src]# cd libpri* [root@FreePBX-Server libpri-1.6.0]# make [root@FreePBX-Server libpri-1.6.0]# make install
Step #08: Download jansson for install FreePBX 14.
[root@FreePBX-Server libpri-1.6.0]# cd /usr/src [root@FreePBX-Server src]# wget -O jansson.tar.gz https://github.com/akheron/jansson/archive/v2.10.tar.gz [root@FreePBX-Server src]# tar xf jansson.tar.gz [root@FreePBX-Server src]# cd jansson* [root@FreePBX-Server jansson-2.10]# autoreconf -i [root@FreePBX-Server jansson-2.10]# ./configure --libdir=/usr/lib64 [root@FreePBX-Server jansson-2.10]# make [root@FreePBX-Server jansson-2.10]# make install
Step 09: Extract asterisk before download from Step #07: and install for FreePBX 14
[root@FreePBX-Server jansson-2.10]# cd /usr/src [root@FreePBX-Server src]# tar xf asterisk-14.7.7.tar.gz [root@FreePBX-Server src]# cd asterisk-14* [root@FreePBX-Server asterisk-14.7.7]# contrib/scripts/install_prereq install [root@FreePBX-Server asterisk-14.7.7]# ./configure --libdir=/usr/lib64 --with-pjproject-bundled [root@FreePBX-Server asterisk-14.7.7]# contrib/scripts/get_mp3_source.sh [root@FreePBX-Server asterisk-14.7.7]# make menuselect [root@FreePBX-Server asterisk-14.7.7]# make [root@FreePBX-Server asterisk-14.7.7]# make install [root@FreePBX-Server asterisk-14.7.7]# make config [root@FreePBX-Server asterisk-14.7.7]# ldconfig [root@FreePBX-Server asterisk-14.7.7]# chkconfig asterisk off
Step #10: Setup asterisk permission and increase upload size for FreePBX 14.
[root@FreePBX-Server asterisk-14.7.7]# cd [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/lib64/asterisk [root@FreePBX-Server ~]# chown -R asterisk. /var/www/ [root@FreePBX-Server ~]# sed -i 's/AllowOverride None/AllowOverride All/' /etc/httpd/conf/httpd.conf [root@FreePBX-Server ~]# systemctl restart httpd.service
Change upload size from /etc/php.ini file.
upload_max_filesize = 120M
Then save for press Esc type :wq then press Enter.
manually add below two line 66 & 67 edit your /etc/httpd/conf/httpd.conf file.
User asterisk
Group asterisk
[root@FreePBX-Server ~]# vi /etc/httpd/conf/httpd.conf
For save press Esc type :wq then press Enter.
Then save file and start again.
[root@FreePBX-Server ~]# systemctl restart httpd.service
Step #11: Now setup mysql secure installation using below command.
[root@FreePBX-Server ~]# mysql_secure_installation
Then see output below
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MariaDB to secure it, we'll need the current password for the root user. If you've just installed MariaDB, and you haven't set the root password yet, the password will be blank, so you should just press enter here. Enter current password for root (enter for none): << Press enter OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MariaDB root user without the proper authorisation. Set root password? [Y/n] Y << Type Y to setup MariaDB root password New password: << Enter MariaDB root password Re-enter new password: << Confirm MariaDB root password Password updated successfully! Reloading privilege tables.. ... Success! By default, a MariaDB installation has an anonymous user, allowing anyone to log into MariaDB without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? [Y/n] Y << Type Y to remove anonymous users ... Success! Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] Y << Type Y to disable root login remotely ... Success! By default, MariaDB comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? [Y/n] Y << Type Y to remove test database - Dropping test database... ... Success! - Removing privileges on test database... ... Success! Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? [Y/n] Y << Type Y to reload privilege tables ... Success! Cleaning up... All done! If you've completed all of the above steps, your MariaDB installation should now be secure. Thanks for using MariaDB!
Important now server reboot needed then install FreePBX 14.
Step #12: Download FreePBX 14 then extract and install on my server CentOS 7.
[root@FreePBX-Server ~]# cd /usr/src [root@FreePBX-Server src]# wget http://mirror.freepbx.org/modules/packages/freepbx/freepbx-14.0-latest.tgz [root@FreePBX-Server src]# tar xf freepbx-14.0-latest.tgz [root@FreePBX-Server src]# cd freepbx* [root@FreePBX-Server freepbx]# sestatus [root@FreePBX-Server freepbx]# ./start_asterisk start [root@FreePBX-Server freepbx]# ./install
Now see output as like below:
Database engine [mysql]: << Press enter Database name [asterisk]: << Press enter CDR Database name [asteriskcdrdb]: << Press enter Database username [root]: << Press enter Database password: passw0rd << Type your root password File owner user [asterisk]: << Press enter File owner group [asterisk]: << Press enter Filesystem location from which FreePBX files will be served [/var/www/html]: << Press enter Filesystem location from which Asterisk configuration files will be served [/etc/asterisk]: << Press enter Filesystem location for Asterisk modules [/usr/lib64/asterisk/modules]: << Press enter Filesystem location for Asterisk lib files [/var/lib/asterisk]: << Press enter Filesystem location for Asterisk agi files [/var/lib/asterisk/agi-bin]: << Press enter Location of the Asterisk spool directory [/var/spool/asterisk]: << Press enter Location of the Asterisk run directory [/var/run/asterisk]: << Press enter Location of the Asterisk log files [/var/log/asterisk]: << Press enter Location of the FreePBX command line scripts [/var/lib/asterisk/bin]: << Press enter Location of the FreePBX (root) command line scripts [/usr/sbin]: << Press enter Location of the Apache cgi-bin executables [/var/www/cgi-bin]: << Press enter Directory for FreePBX html5 playback files [/var/lib/asterisk/playback]: << Press enter
This is last message like as :
Finished setting permissions
Generating default configurations...
Finished generating default configurations
You have successfully installed FreePBX
Important note : must be selinux disable otherwise not install FreePBX 14.
Step #13 : Now browser your server IP address using any browser. Then create your admin account and enjoy IP telephony system.
http://10.66.40.10/
See some module so if you need more module then update your server.
Goto Module Admin under Admin menu. Now click Check Online then click Download all. Then click Process and finally click Confirm on the left bottom.
Step #14 : After download complete then click Return and then click Apply Config on the top right corner.
If see any problem so see my YouTube channel. Please subscribe my channel for more update.
- 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!
Hello, I have a problem, it is only after installation when freePBX was successfully installed. When I go to my browser and type the IP address of my server, it puts me:
This page does not work
Unable to process this request via 192.168.1.20 at this time.
HTTP ERROR 500
What to do please, I tried to uninstall the firewall from the beginning, but to no avail.
I am already enable 80 port from Step #01. If you use 443 for https so please enable this post same as Step #01 check again.
Thanks.
sir, I have the same problem as mentioned above, I am already using port 80 , please tell me the solution
I think your server run multiple web server like httpd and nginx. So stop one then use this.
Thank you so much!
Hello, I have a problem,
Error communicating with Asterisk. Ensure that Asterisk is properly installed and running as the asterisk user
Asterisk does not appear to be running
Try starting Asterisk with the ‘./start_asterisk start’ command in this directory
Any error you see when run ./start_asterisk start this command. So please send me error log or contact me via my facebook page.
And also you can check your server 80 port is allow from firewall now you see firewall allow port list for run below command.
$ firewall-cmd –list-all
Advanced firewall list for FreePBX
Thanks.
done the same as mentioned by you but still i am getting same error.
Hello, I have a problem, it is only after installation when freePBX was successfully installed. When I go to my browser and type the IP address of my server, it puts me:
Warning: ALREADY_ENABLED: 80:tcp
Check web server error log and access log then see what is problem.
Thanks.
hello. i have successfully installed FreePBX
[root@freepbx ~]# firewall-cmd –list-all
public (active)
target: default
icmp-block-inversion: no
interfaces: ens33
sources:
services: dhcpv6-client sip sips ssh
ports: 443/tcp 10000-20000/udp 4569/udp 5060/udp 5061/udp 5160/udp 5161/udp 5160/tcp 5060/tcp 81/tcp 4443/tcp 8088/tcp 8089/tcp 8001/tcp 8003/tcp
and stile i can not access to GUI freepx , plz help me
Please enable http port 80 same as before command.
Thanks.
[root@freepbx ~]# tail -f /var/log/httpd/error_log
your web directory permission problem. Please see again Step #10:
So I think it is solved!
Thanks.
Thank you very much sir, you save my life.
I’m struggling a week with official FreePBX procedure without any success. Your procedure is awesome thank you
Most welcome!
[root@78 asterisk-14.7.7]# cd
[root@78 ~]# chown asterisk. /var/run/asterisk
chown: invalid user: ‘asterisk.’
[root@78 ~]#
Maybe you skip add user from Step #01.
adduser asterisk -m -c “Asterisk User”
Thanks.
hello I have a problem Database installation checking credentials and permissions..Erro
r!
Invalid Database Permissions. The error was: SQLSTATE[28000] [10
45] Access denied for user ‘GmarvinG’@’localhost’ (using passwor
d: NO)
Must be use user grant permission or you can use root user.
Thank you so much!
hello when i try to login to webpage by ip it gives error “file(/etc/amportal.conf): failed to open stream: Permission denied”
how can i solve this sestatus is disabled
Again step #12 then you can try.
Thanks.
i am having issue while using ./install .I am new user working on 1 project.
i have attached copy of error kindly suggest what can i do to fix .
Checking if Asterisk is running and we can talk to it as the ‘asterisk’ user…Error!
Error communicating with Asterisk. Ensure that Asterisk is properly installed and running as the asterisk user
Asterisk appears to be running as root
Try starting Asteris
First check selinux status, its should be turn off then server reboot and then start asterisk service from freepbx folder. then run ./install command.
Thanks.
after installation, I got HTTPS error 500, Pls share solution
It should be check apache web service is running properly.
Thanks.
after installing centos 7 i log in and at the top right i get can not connect to asterisk
Check firewall status should be disable. Thanks.