Freepbx fails to install very quickly

Hi. This is a new install on a new server on bullseye and I am trying to install freepbx 16 according to the documentation. Here is the complete output of the install and it is failing. There is no asterisk database, do I have to create it first?

Thanks in advance for any suggestions.

Script started on 2021-08-29 09:07:42-04:00 [TERM=“linux” TTY="/dev/pts/0" COLUMNS=“240” LINES=“67”]
Database engine [mysql]:
Database name [asterisk]:
Database server address [localhost]:
Database server port [3306]:
CDR Database name [asteriskcdrdb]:
Database username [root]:
Database password: lnx235db0$
File owner user [asterisk]:
File owner group [asterisk]:
Filesystem location from which FreePBX files will be served [/var/www/html]:
Filesystem location from which Asterisk configuration files will be served [/etc/asterisk]:
Filesystem location for Asterisk modules [/usr/lib/asterisk/modules]:
Filesystem location for Asterisk lib files [/var/lib/asterisk]:
Filesystem location for Asterisk agi files [/var/lib/asterisk/agi-bin]:
Location of the Asterisk spool directory [/var/spool/asterisk]:
Location of the Asterisk run directory [/var/run/asterisk]:
Location of the Asterisk log files [/var/log/asterisk]:
Location of the FreePBX command line scripts [/var/lib/asterisk/bin]:
Location of the FreePBX (root) command line scripts [/usr/sbin]:
Location of the Apache cgi-bin executables [/var/www/cgi-bin]:
Directory for FreePBX html5 playback files [/var/lib/asterisk/playback]:
e[32mAssuming you are Database Roote[39m
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: 18.3.0
Checking if NodeJS is installed and we can get a version from it…Yes. Determined NodeJS version to be: 12.22.5
Preliminary checks done. Starting FreePBX Installation
Checking if this is a new install…Yes (No /etc/freepbx.conf file detected)
Database Root installation checking credentials and permissions…Connected!

e[33mIn utility.functions.php line 120:e[39m
e[37;41m e[39;49m
e[37;41m SQLSTATE[HY000] [1049] Unknown database ‘asterisk’::SQLSTATE[HY000] [1049] Unknown database ‘asterisk’ e[39;49m
e[37;41m e[39;49m

e[33mIn Database.class.php line 144:e[39m
e[37;41m e[39;49m
e[37;41m SQLSTATE[HY000] [1049] Unknown database ‘asterisk’ e[39;49m
e[37;41m e[39;49m

e[32minstall [–dbengine DBENGINE] [–dbname DBNAME] [–dbhost DBHOST] [–dbport DBPORT] [–cdrdbname CDRDBNAME] [–dbuser DBUSER] [–dbpass DBPASS] [–user USER] [–group GROUP] [–dev-links] [–skip-install] [–webroot WEBROOT] [–astetcdir ASTETCDIR] [–astmoddir ASTMODDIR] [–astvarlibdir ASTVARLIBDIR] [–astagidir ASTAGIDIR] [–astspooldir ASTSPOOLDIR] [–astrundir ASTRUNDIR] [–astlogdir ASTLOGDIR] [–ampbin AMPBIN] [–ampsbin AMPSBIN] [–ampcgibin AMPCGIBIN] [–ampplayback AMPPLAYBACK] [-r|–rootdb] [-f|–force]e[39m

Script done on 2021-08-29 09:08:26-04:00 [COMMAND_EXIT_CODE=“255”]

Sorry for the color codes, will try to eliminate them next time.

You ran the install script with the --rootdb option ?

./install --help

Bullseye installs php 7.4, this might be one step too far for FreePBX.

7.4 is what FreePBX 16 requires.

OP what documentation did you follow?

I did not install with any option, they said to do install -n, but since I have a password on the root user, I did not say the -n.

The documentation I used is

Are you sure your root user has permissions to create databases?

Well, I apparently broke the mariadb server, so after restoring my system from backup, the install went much better. I have just one question, there was no /usr/share/asterisk – I installed from git, so I could not do the instructions about moving sounds and putting a link there. Is freepbx looking for anything in /usr/share/asterisk, or are we OK?

If you install from Debian packages, they will use “Debian standard” locations such as /usr/share.

Since you built Asterisk from source you don’t need to do any of the manipulation of /usr/share but you do need to make sure the file paths in /etc/asterisk/asterisk.conf are right. The make install step of building from source should have created directories for you though.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.