Installing FreePBX/Asterisk on CentOS 7 fails at the point of enabling mariadb. To be clear, this is not a FreePBX or Asterisk issue. It’s an issue with an rpm package in the CentOS yum repository that breaks the systemctl command, so services can’t be stopped or started. Consider the following manual installation recipe.
Everything goes fine up until the “systemctl enable mariadb.service” step, which returns an error saying that systemctl failed to run because polkit wasn’t able to get necessary authorization. Of course, the problem isn’t limited to mariadb because systemctl won’t work for any application.
The problem is created when the “Development Tools” groupinstall runs, which installs a bogus polkit rpm (it’s actually two rpms). Fortunately polkit isn’t required for either FreePBX or Asterisk so it can be fixed by simply uninstalling polkit after the groupinstall runs. To do that you can issue the following command anytime after the “Development Tools” groupinstall but before issuing the “systemctl enable mariadb.service” command.
yum remove polkit
Hopefully the Red Hat people will recognize the polkit problem before long and correct the rpm in the repository, but in the meantime installing the “Development Tools” group will break systemctl.