FreePBX install problem

Dear community.
It’s probably stupid, but it is.
It is about FreePBX. I have running Nethserver v. 7-7.1908 and everything works fine. Once I installed and tested freepbx. I was not sure if I will continue to run FreePBX on this server and wanted to completely uninstall and remove. I used a manual from Need help to remove asterisk.
Now I want to have it back and the installation of FreePBX runs without errors but does not work.
https://my-nethserver/freepbx -> “File not found”

I think that Asterisk is not completely installed, because for example /var/lib/asterisk/bin/ is missing…
How can I restore all Asterisk packages and get FreePBX running again.

For your help I am very grateful.

Did you manually remove the packages?

Did you delete the files and dirs, especially /var/www/html/freepbx and /usr/src/freepbx dirs and the databases?

Hello Markus.
Yes, manually.
Yes, I have deleted all directories, and DBs…

You may check /var/log/messages and /var/log/freepbx_rpm_install.log` for errors.

I assume freepbx (/var/www/html/freepbx) is (partly) missing.
Please check if files like index.php are there:

ls -l /var/www/html/freepbx

Use the following to force reinstalling freepbx:

rm -f /var/www/html/freepbx/index.php /etc/freepbx.conf /etc/amportal.conf
signal-event nethserver-freepbx-update

[root@DNS-GW ~]# ls -l /var/www/html/freepbx
total 0

and
ls -l /var/www/html/freepbx
total 0

I have deleted and updated (signal-event nethserver-freepbx-update)

Are there files now in /var/www/html/freepbx? Do you still get the “file not found” ?

Yes, “File not found”

This is from /var/log/freepbx_rpm_install.log

*** Installing FreePBX
Tue Mar 31 19:10:16 CEST 2020
Making sure asterisk user has bash as shell
usermod: no changes
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: 13.29.2
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!
Initializing FreePBX Settings

In utility.functions.php line 207:

fatal error reading freepbx_settings::

install [–dbengine DBENGINE] [–dbname DBNAME] [–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]

/etc/e-smith/events/nethserver-freepbx-update/S55nethserver-freepbx-conf-scl: line 39: /usr/sbin/fwconsole: No such file or directory
/etc/e-smith/events/nethserver-freepbx-update/S55nethserver-freepbx-conf-scl: line 40: /usr/sbin/fwconsole: No such file or directory

You may try to delete the DB and then reinstall freepbx with the 2 lines I posted above. It should recreate the missing files.

Ok, I’ll try it…

*** Installing FreePBX
Tue Mar 31 20:51:37 CEST 2020
Making sure asterisk user has bash as shell
usermod: no changes
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: 13.29.2
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!
Empty asteriskcdrdb Database going to populate it
Initializing FreePBX Settings

In utility.functions.php line 207:

fatal error reading freepbx_settings::

install [–dbengine DBENGINE] [–dbname DBNAME] [–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]

/etc/e-smith/events/nethserver-freepbx-update/S55nethserver-freepbx-conf-scl: line 39: /usr/sbin/fwconsole: No such file or directory
/etc/e-smith/events/nethserver-freepbx-update/S55nethserver-freepbx-conf-scl: line 40: /usr/sbin/fwconsole: No such file or directory

It seems you still have the asterisk db as only the asteriskcdrdb is populated.

Please delete both DBs:

mysql
drop database asterisk;
drop database asteriskcdrdb;
exit

This is how it looks when it works:

Checking if this is a new install...Yes (No /etc/freepbx.conf file detected)
Database Root installation checking credentials and permissions..Connected!
Empty asterisk Database going to populate it
Updating tables admin, ampusers, cronmanager, featurecodes, freepbx_log, freepbx_settings, globals, module_xml, modules, notifications, cron_jobs...Done
Empty asteriskcdrdb Database going to populate it
Initializing FreePBX Settings
        Changing AMPWEBROOT [/var/www/html] to match what was given at install time: /var/www/html/freepbx
        Changing AMPMGRPASS [amp111] to match what was given at install time: cef06c6402ded3df51320c178596c0c4
        Changing ASTMODDIR [/usr/lib/asterisk/modules] to match what was given at install time: /usr/lib64/asterisk/modules