{"id":622,"date":"2022-03-22T11:11:42","date_gmt":"2022-03-22T04:11:42","guid":{"rendered":"https:\/\/naitinoi.com\/?p=622"},"modified":"2022-03-22T15:42:05","modified_gmt":"2022-03-22T08:42:05","slug":"install-freepbx-15-on-centos-7","status":"publish","type":"post","link":"https:\/\/omtel.ltd\/index.php\/2022\/03\/22\/install-freepbx-15-on-centos-7\/","title":{"rendered":"Install FreePBX 15 on CentOS 7"},"content":{"rendered":"\n<p><strong>Ref. https:\/\/wiki.freepbx.org\/display\/FOP\/Installing+FreePBX+14+on+CentOS+7<\/strong><\/p>\n\n\n\n<p><strong>1.Disable SELinux<\/strong><\/p>\n\n\n\n<h1 class=\"wp-block-heading\" style=\"font-size:16px;font-style:normal;font-weight:400\">sed -i &#8216;s\/(^SELINUX=).*\/\\SELINUX=disabled\/&#8217; \/etc\/sysconfig\/selinux<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\" style=\"font-size:16px;font-style:normal;font-weight:400\">sed -i &#8216;s\/(^SELINUX=).*\/\\SELINUX=disabled\/&#8217; \/etc\/selinux\/config<\/h1>\n\n\n\n<p>[root@ippbx selinux]# sestatus<br>SELinux status: disabled<\/p>\n\n\n\n<p><strong>2.CentOS system and Install Development Tools<\/strong><br>[root@ippbx ~]# yum -y groupinstall core base &#8220;Development Tools&#8221;<br>[root@ippbx ~]# adduser asterisk -m -c &#8220;Asterisk User&#8221;<br>[root@ippbx ~]#yum -y install firewalld<br>[root@ippbx ~]# systemctl unmask firewalld<br>[root@ippbx ~]# vi \/etc\/firewalld\/zones\/public.xml<br><br><img loading=\"lazy\" decoding=\"async\" width=\"500\" height=\"214\" class=\"wp-image-626\" style=\"width: 500px;\" src=\"https:\/\/naitinoi.com\/wp-content\/uploads\/2022\/03\/firewall.jpg\" alt=\"\" srcset=\"https:\/\/omtel.ltd\/wp-content\/uploads\/2022\/03\/firewall.jpg 651w, https:\/\/omtel.ltd\/wp-content\/uploads\/2022\/03\/firewall-300x128.jpg 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><br>[root@ippbx selinux]# firewall-cmd &#8211;reload<br>success<br>[root@ippbx selinux]# systemctl start firewalld<\/p>\n\n\n\n<p><strong>3.Install other required dependencies<\/strong><br>[root@ippbx selinux]# yum -y install dnf lynx tftp-server unixODBC mariadb-server mariadb mysql-connector-odbc httpd ncurses-devel sendmail sendmail-cf newt-devel libxml2-devel libtiff-devel gtk2-devel subversion git wget vim uuid-devel sqlite-devel net-tools gnutls-devel texinfo libuuid-devel libedit-devel<br>[root@ippbx selinux]# dnf install -y epel-release<br>[root@ippbx ~]# dnf install -y python3-devel<\/p>\n\n\n\n<p><strong>4.Install MariaDB Database server<\/strong><br>[root@ippbx ~]# systemctl enable mariadb.service<br>Created symlink from \/etc\/systemd\/system\/multi-user.target.wants\/mariadb.service to \/usr\/lib\/systemd\/system\/mariadb.service.<br>[root@ippbx ~]# systemctl start mariadb<br>Enter current password for root (enter for none):Enter<br>Set root password? [Y\/n] y<br>New password:xxxxx<br>Remove anonymous users? [Y\/n] y<br>Disallow root login remotely? [Y\/n]y<br>Remove test database and access to it? [Y\/n]y<br>Reload privilege tables now? [Y\/n] y<br>[root@ippbx ~]# netstat -lntup<br>Active Internet connections (only servers)<br>Proto Recv-Q Send-Q Local Address Foreign Address State PID\/Program name<br>tcp 0 0 0.0.0.0:9696 0.0.0.0:* LISTEN 30039\/sshd<br>tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 31088\/mysqld<br>tcp6 0 0 :::9696 :::* LISTEN 30039\/sshd<\/p>\n\n\n\n<p><strong>5.Installing Node.js<\/strong><br>[root@ippbx ~]# curl -sL https:\/\/rpm.nodesource.com\/setup_12.x | bash &#8211;<br>[root@ippbx ~]# dnf install -y nodejs<br>[root@ippbx ~]# node -v<br>v12.22.11<\/p>\n\n\n\n<p><strong>6.Install and configure Apache Web Server<\/strong><br>[root@ippbx ~]# yum -y install httpd<br>[root@ippbx ~]# systemctl enable httpd.service<br>Created symlink from \/etc\/systemd\/system\/multi-user.target.wants\/httpd.service to \/usr\/lib\/systemd\/system\/httpd.service.<br>[root@ippbx ~]# systemctl start httpd.service<br>change Apache user to asterisk and turn on AllowOverride option :<br>[root@ippbx ~]# cp \/etc\/httpd\/conf\/httpd.conf \/etc\/httpd\/conf\/httpd.conf_orig<br>[root@ippbx ~]# sed -i &#8216;s\/^(User|Group).*\/\\1 asterisk\/&#8217; \/etc\/httpd\/conf\/httpd.conf<br>[root@ippbx ~]# sed -i &#8216;s\/AllowOverride None\/AllowOverride All\/&#8217; \/etc\/httpd\/conf\/httpd.conf<br>[root@ippbx src]# systemctl restart httpd.service<\/p>\n\n\n\n<p>Remove default index.html page<br>[root@ippbx ~]# rm -f \/var\/www\/html\/index.html<\/p>\n\n\n\n<p><strong>7.Install PHP and required extensions<\/strong><br>[root@ippbx ~]# yum -y install wget php php-pear php-cgi php-common php-curl php-mbstring php-gd php-mysql php-gettext php-bcmath php-zip php-xml php-imap php-json php-process php-snmp<\/p>\n\n\n\n<p>[root@ippbx ~]# pear install Console_Getopt<\/p>\n\n\n\n<p><strong>8.Download Source<\/strong><br>[root@ippbx ~]# cd \/usr\/src\/<br>[root@ippbx src]# wget http:\/\/mirror.freepbx.org\/modules\/packages\/freepbx\/freepbx-15.0-latest.tgz<br>[root@ippbx src]# wget https:\/\/ftpmirror.gnu.org\/libtool\/libtool-2.4.6.tar.gz<br>[root@ippbx src]# wget http:\/\/digip.org\/jansson\/releases\/jansson-2.13.tar.gz<br>[root@ippbx src]# wget http:\/\/downloads.asterisk.org\/pub\/telephony\/dahdi-linux-complete\/dahdi-linux-complete-current.tar.gz<br>[root@ippbx src]# wget http:\/\/downloads.asterisk.org\/pub\/telephony\/libpri\/libpri-current.tar.gz<\/p>\n\n\n\n<p>Install Libtools<br>[root@ippbx src]# tar xvf libtool-2.4.6.tar.gz<br>[root@ippbx src]# cd libtool-2.4.6<br>[root@ippbx libtool-2.4.6]# .\/configure<br>[root@ippbx libtool-2.4.6]# make install<\/p>\n\n\n\n<p><strong>9.Compile and install DAHDI<\/strong><br><strong>If you don&#8217;t have any physical PSTN hardware attached to this machine, you don&#8217;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.<br>http:\/\/downloads.asterisk.org\/pub\/telephony<\/strong>\/<\/p>\n\n\n\n<p>[root@ippbx src]# tar xvf dahdi-linux-complete-current.tar.gz<br>[root@ippbx src]# cd dahdi-linux-complete-*<\/p>\n\n\n\n<p>[root@ippbx dahdi-linux-complete-3.1.0+3.1.0]# make<br>make -C linux all<br>make[1]: Entering directory <code>\/usr\/src\/dahdi-linux-complete-3.1.0+3.1.0\/linux' make -C drivers\/dahdi\/firmware firmware-loaders make[2]: Entering directory<\/code>\/usr\/src\/dahdi-linux-complete-3.1.0+3.1.0\/linux\/drivers\/dahdi\/firmware&#8217;<br>make[2]: Leaving directory <code>\/usr\/src\/dahdi-linux-complete-3.1.0+3.1.0\/linux\/drivers\/dahdi\/firmware' You do not appear to have the sources for the 3.10.0-1160.53.1.el7.x86_64 kernel installed. make[1]: *** [modules] Error 1 make[1]: Leaving directory<\/code>\/usr\/src\/dahdi-linux-complete-3.1.0+3.1.0\/linux&#8217;<br>make: *** [all] Error 2<\/p>\n\n\n\n<p><strong>Install Development package for building kernel modules to match the kernel<\/strong><br>[root@ippbx dahdi-linux-complete-3.1.0+3.1.0]# yum search kernel-*<br>[root@ippbx dahdi-linux-complete-3.1.0+3.1.0]#reboot<\/p>\n\n\n\n<p>[root@ippbx]# cd \/usr\/src\/dahdi-linux-complete-*<br>[root@ippbx dahdi-linux-complete-3.1.0+3.1.0]# make install<br>[root@ippbx dahdi-linux-complete-3.1.0+3.1.0]# make install-config<\/p>\n\n\n\n<p>[root@ippbx dahdi-linux-complete-3.1.0+3.1.0]# cd \/usr\/src\/libpri-1.6.0\/<br>[root@ippbx src]# tar xvf libpri-current.tar.gz<br>[root@ippbx src]# cd libpri-1.6.0\/<br>[root@ippbx libpri-1.6.0]# make<br>[root@ippbx libpri-1.6.0]# make install<\/p>\n\n\n\n<p><strong>10.Compile and Install jansson<\/strong><br>[root@ippbx libpri-1.6.0]# cd \/usr\/src<br>[root@ippbx src]# tar xvf jansson-2.13.tar.gz<br>[root@ippbx src]# cd jansson-2.13\/<br>[root@ippbx jansson-2.13]# autoreconf -i<br>[root@ippbx jansson-2.13]# .\/configure &#8211;libdir=\/usr\/lib64<br>[root@ippbx jansson-2.13]# make<br>make all-recursive<br>make[1]: Entering directory <code>\/usr\/src\/jansson-2.13' Making all in doc make[2]: Entering directory<\/code>\/usr\/src\/jansson-2.13\/doc&#8217;<br>make[2]: Nothing to be done for <code>all'. make[2]: Leaving directory<\/code>\/usr\/src\/jansson-2.13\/doc&#8217;<br>Making all in src<br>make[2]: Entering directory <code>\/usr\/src\/jansson-2.13\/src' \/bin\/sh ..\/libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -Wshadow -Wno-format-truncation -g -O2 -MT dump.lo -MD -MP -MF .deps\/dump.Tpo -c -o dump.lo dump.c libtool: Version mismatch error. This is libtool 2.4.6.42-b88ce-dirty, but the libtool: definition of this LT_INIT comes from libtool 2.4.2. libtool: You should recreate aclocal.m4 with macros from libtool 2.4.6.42-b88ce-dirty libtool: and run autoconf again. make[2]: *** [dump.lo] Error 63 make[2]: Leaving directory<\/code>\/usr\/src\/jansson-2.13\/src&#8217;<br>make[1]: *** [all-recursive] Error 1<br>make[1]: Leaving directory `\/usr\/src\/jansson-2.13&#8242;<br>make: *** [all] Error 2<\/p>\n\n\n\n<p>[root@ippbx jansson-2.13]# autoreconf -fvi<br>autoreconf: Entering directory <code>.' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal --force autoreconf: configure.ac: tracing autoreconf: running: libtoolize --copy --force libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR,<\/code>.&#8217;.<br>libtoolize: copying file <code>.\/ltmain.sh' libtoolize: Consider adding<\/code>AC_CONFIG_MACRO_DIR([m4])&#8217; to configure.ac and<br>libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.<br>libtoolize: Consider adding <code>-I m4' to ACLOCAL_AMFLAGS in Makefile.am. autoreconf: running: \/usr\/bin\/autoconf --force autoreconf: running: \/usr\/bin\/autoheader --force autoreconf: running: automake --add-missing --copy --force-missing autoreconf: Leaving directory<\/code>.&#8217;<\/p>\n\n\n\n<p>[root@ippbx jansson-2.13]# autoreconf -i<br>libtoolize: Consider adding <code>AC_CONFIG_MACRO_DIR([m4])' to configure.ac and libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree. libtoolize: Consider adding<\/code>-I m4&#8242; to ACLOCAL_AMFLAGS in Makefile.am.<\/p>\n\n\n\n<p>[root@ippbx jansson-2.13]# vi configure.ac<br>AC_CONFIG_MACRO_DIR([m4]) &lt;&#8211;Add this line<br>(save)<br>[root@ippbx jansson-2.13]# vi Makefile.am<br>EXTRA_DIST = CHANGES LICENSE README.rst CMakeLists.txt cmake android examples<br>SUBDIRS = doc src test<br>ACLOCAL_AMFLAGS = -I m4 &lt;&#8211;Add this line<br>(save)<\/p>\n\n\n\n<p>[root@ippbx jansson-2.13]# autoreconf -i<br>[root@ippbx jansson-2.13]# .\/configure &#8211;libdir=\/usr\/lib64<br>[root@ippbx jansson-2.13]# make<br>[root@ippbx jansson-2.13]# make install<br>[root@ippbx jansson-2.13]# ls \/usr\/lib64\/libjansson.<br>libjansson.a libjansson.la libjansson.so libjansson.so.4 libjansson.so.4.10.0 libjansson.so.4.12.0<\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"11\"><li><strong>Compile and install Asterisk<\/strong><br>[root@ippbx src]# tar xvf asterisk-16-current.tar.gz<br>[root@ippbx src]# cd asterisk-*<br>[root@ippbx asterisk-16.24.1]# contrib\/scripts\/install_prereq install<br>[root@ippbx asterisk-16.24.1]# .\/configure &#8211;libdir=\/usr\/lib64 &#8211;with-pjproject-bundled &#8211;with-crypto &#8211;with-ssl=ssl &#8211;with-srtp<br>configure: Menuselect build configuration successfully completed <code>.<\/code><\/li><\/ol>\n\n\n\n<p>[root@ippbx asterisk-16.24.1]# make menuselect<br>Add-On<br>[x]format_mp3<br>Applications<br>[x]app_macro<br>[Save&amp;Exit]<\/p>\n\n\n\n<p>[root@ippbx asterisk-16.24.1]# make<br>[root@ippbx asterisk-16.24.1]# contrib\/scripts\/get_mp3_source.sh<br>[root@ippbx asterisk-16.24.1]# make install<br>[root@ippbx asterisk-16.24.1]# make config<br>[root@ippbx asterisk-16.24.1]# ldconfig<br>[root@ippbx asterisk-16.24.1]# chkconfig asterisk off<\/p>\n\n\n\n<p>Set Asterisk ownership permissions.<br>[root@ippbx asterisk-16.24.1]# chown asterisk. \/var\/run\/asterisk<br>[root@ippbx asterisk-16.24.1]# chown -R asterisk. \/etc\/asterisk<br>[root@ippbx asterisk-16.24.1]# chown -R asterisk. \/var\/{lib,log,spool}\/asterisk<br>[root@ippbx asterisk-16.24.1]# chown -R asterisk. \/usr\/lib64\/asterisk<br>[root@ippbx asterisk-16.24.1]# chown -R asterisk. \/var\/www\/<\/p>\n\n\n\n<p><strong>Install and Configure FreePBX<\/strong><br>Change php maximum file upload size:<br>[root@ippbx asterisk-16.24.1]# sed -i &#8216;s\/(^upload_max_filesize = ).<em>\/\\120M\/&#8217; \/etc\/php.ini [root@ippbx asterisk-16.24.1]# sed -i &#8216;s\/^(User|Group).<\/em>\/\\1 asterisk\/&#8217; \/etc\/httpd\/conf\/httpd.conf<br>[root@ippbx asterisk-16.24.1]# sed -i &#8216;s\/AllowOverride None\/AllowOverride All\/&#8217; \/etc\/httpd\/conf\/httpd.conf<br>[root@ippbx asterisk-16.24.1]# systemctl restart httpd.service<\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"12\"><li><strong>Install FreePBX.<\/strong><br>[root@ippbx asterisk-16.24.1]# cd \/usr\/src<br>[root@ippbx src]# tar xvf freepbx-15.0-latest.tgz<br>[root@ippbx src]# cd freepbx<br>[root@ippbx freepbx]# .\/start_asterisk start<br>STARTING ASTERISK<br>Asterisk Started<\/li><\/ol>\n\n\n\n<p>[root@ippbx freepbx]#netstat -lntup<br><strong>Show Asterisk Process must started<br>Check If Asterisk not start<\/strong><\/p>\n\n\n\n<p>[root@ippbx freepbx]# asterisk -cvvvvv<br>[Mar 22 03:23:23] ERROR[1954]: logger.c:1985 init_logger: Errors detected in logger.conf. Default console logging is being used.<br>Asterisk Dynamic Loader Starting:<br>[Mar 22 03:23:23] WARNING[1954]: loader.c:2224 loader_config_init: &#8216;modules.conf&#8217; invalid or missing.<br>[Mar 22 03:23:23] ERROR[1954]: asterisk.c:3935 check_init: Module initialization failed. ASTERISK EXITING!<br>[root@ippbx asterisk-16.24.1]# cd configs\/samples\/<br>[root@ippbx samples]# cp modules.conf.sample \/etc\/asterisk\/modules.conf<br>[root@ippbx samples]# cp logger.conf.sample \/etc\/asterisk\/logger.conf<br>[root@ippbx samples]# chown -R asterisk. \/etc\/asterisk\/*<br>[root@ippbx samples]# asterisk -cvvvvv<br>Asterisk already running on \/var\/run\/asterisk\/asterisk.ctl. Use &#8216;asterisk -r&#8217; to connect.<\/p>\n\n\n\n<p>[root@ippbx freepbx]# .\/install -n &#8211;dbuser root &#8211;dbpass (YourPassword)<br>FreePBX Requires PHP Version 5.6 or Higher, you have: 5.4.16<\/p>\n\n\n\n<p><br>[root@ippbx freepbx]# yum install http:\/\/rpms.remirepo.net\/enterprise\/remi-release-7.rpm<br>[root@ippbx freepbx]# rpm -Uvh https:\/\/mirror.webtatic.com\/yum\/el7\/webtatic-release.rpm<br>[root@ippbx freepbx]# yum install yum-utils<br>[root@ippbx freepbx]# yum-config-manager &#8211;enable remi-php56<br>[root@ippbx freepbx]# yum remove php*<br>[root@ippbx freepbx]# yum install php56w php56w-pdo php56w-mysql php56w-mbstring php56w-pear php56w-process php56w-xml php56w-opcache php56w-ldap php56w-intl php56w-soap Loaded plugins: fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager<br>[root@ippbx freepbx]# php -v<br>[root@ippbx freepbx]# netstat -lntup<\/p>\n\n\n\n<p><strong>IF You have successfully installed FreePBX<br>Open Web Browser and config your administrator password<\/strong><br>http:\/\/IPADDRESS\/admin\/config.php<\/p>\n\n\n\n<p>[root@ippbx modprobe.d]# ee \/etc\/php.ini<br>memory_limit = 256M<\/p>\n\n\n\n<p>[root@freepbx freepbx]# fwconsole restart<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ref. https:\/\/wiki.freepbx.org\/display\/FOP\/Installing+Fr [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-622","post","type-post","status-publish","format-standard","hentry","category-voip"],"_links":{"self":[{"href":"https:\/\/omtel.ltd\/index.php\/wp-json\/wp\/v2\/posts\/622","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/omtel.ltd\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/omtel.ltd\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/omtel.ltd\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/omtel.ltd\/index.php\/wp-json\/wp\/v2\/comments?post=622"}],"version-history":[{"count":8,"href":"https:\/\/omtel.ltd\/index.php\/wp-json\/wp\/v2\/posts\/622\/revisions"}],"predecessor-version":[{"id":631,"href":"https:\/\/omtel.ltd\/index.php\/wp-json\/wp\/v2\/posts\/622\/revisions\/631"}],"wp:attachment":[{"href":"https:\/\/omtel.ltd\/index.php\/wp-json\/wp\/v2\/media?parent=622"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/omtel.ltd\/index.php\/wp-json\/wp\/v2\/categories?post=622"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/omtel.ltd\/index.php\/wp-json\/wp\/v2\/tags?post=622"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}