I have been using FreePBX successfully on Debian for awhile (native install - download asterisk & FreePBX, compile, and install so I am familiar with a more “complex” installation versus an “image” build). More importantly I have also been running Asterisk-12 on ArchLinux ARM for about six months and am so excited about FreePBX-12 beta that I can hardly contain myself ( e.g., hard to sleep at night )
Yes I realize ArchLinux is “outside” the normal FreePBX comfort zone, but ArchLinux runs really well on tiny/inexpensive ARM based systems so I wanted to get FreePBX-12 up and running to work with Asterisk-12 on the ArchLinux ARM platform, and yes I also know about and have ARM versions of Debian that currently run Asterisk and FreePBX.
What’s really interesting is that the ArchLinux ARM community actually has Asterisk-12 as a fully precompiled very-easy-to-install package. Like apt-get for the Debian world, we call it (pacman), in ArchLinux ARM, Asterisk-12 is very simple to install no dependencies to worry about, no compiling, etc. My objective is to also build a simple, ready-to-go installation for FreePBX-12 that users can install as simply as Asterisk-12, all they would have to do is an “apt-get” so to speak. The ArchLinux repository would be setup to stay in sync with FreePBX (e.g., new versions of FreePBX would automatically “update” in the ArchLinux repository). I realize it’s an ambitious project, but it’s been done with Asterisk-12, so I figured it can be done with FreePBX-12 and the wide range of roughly $75 ARM computers make very nice FreePBX/Asterisk “appliances” for small applications (e.g., 10-20 simultaneous “voice/call” events)
Anyway, I have managed to tweak a few items such as the php sessions directory being located in /usr/include/php/sessions versus /var/lib/php/sessions and other adjustments, but I am having a little trouble with some parts of the installation scripts and could use some assistance.
Below is the output from a (./install_amp --cleaninstall). I have highlighted (bold & italics) a few of the error messages that I am unable to decipher and would appreciate any suggestions.
[root@beaglebone freepbx]# ./install_amp --cleaninstall
Checking for PEAR DB…OK
Checking for PEAR Console::Getopt…OK
Remove /etc/amportal.conf?:
[y] y
Removing /etc/amportal.conf…Done!
Remove /etc/freepbx.conf?:
[y] y
Removing /etc/freepbx.conf…Done!
Remove /usr/local/sbin/amportal?:
[y] y
Removing /usr/local/sbin/amportal…Done!
Remove All FreePBX Tools in /var/lib/asterisk/bin?:
[y] y
Removing /var/lib/asterisk/bin/archive_recordings…Done!
Removing /var/lib/asterisk/bin/freepbx_engine…Done!
Removing /var/lib/asterisk/bin/gen_amp_conf.php…Done!
Removing /var/lib/asterisk/bin/libfreepbx.confgen.php…Done!
Removing /var/lib/asterisk/bin/retrieve_conf…Done!
Removing /var/lib/asterisk/bin/freepbx-cron-scheduler.php…Done!
Removing /var/lib/asterisk/bin/freepbx_setting…Done!
Removing /var/lib/asterisk/bin/generate_hints.php…Done!
Removing /var/lib/asterisk/bin/module_admin…Done!
Removing /var/lib/asterisk/bin/retrieve_parse_amportal_conf.pl…Done!
Remove /srv/http/freepbx?:
[y] y
Removing /srv/http/freepbx…Done!
Reinitalize & Reinstall Freepbx’s Asterisk Database?:
[y] y
Erasing FreePBX Asterisk Database…Done
Reinstalling FreePBX Asterisk DB Structure…Done
Reinitalize & Reinstall Freepbx’s CDR Database?:
[y] y
Erasing FreePBX CDR Database…Done
Reinstalling FreePBX CDR DB Structure…Done!
Checking user…OK
Checking if Asterisk is running…running with PID: 12741…OK
Checking for /etc/amportal.conf…/etc/amportal.conf does not exist, copying default
Creating new /etc/amportal.conf
Enter your USERNAME to connect to the ‘asterisk’ database:
[asteriskuser]
Enter your PASSWORD to connect to the ‘asterisk’ database:
[amp109]
Enter the hostname of the ‘asterisk’ database:
[localhost]
Enter a USERNAME to connect to the Asterisk Manager interface:
[admin]
Enter a PASSWORD to connect to the Asterisk Manager interface:
[amp111]
Enter the path to use for your AMP web root:
[/var/www/html]
/srv/http/freepbx
Created /srv/http/freepbx
Enter the IP ADDRESS or hostname used to access the AMP web-admin:
[192.168.1.1] 192.168.179.42
Use simple Extensions [extensions] admin or separate Devices and Users [deviceanduser]?
[extensions]
Enter directory in which to store AMP executable scripts:
[/var/lib/asterisk/bin]
Enter directory in which to store super-user scripts:
[/usr/local/sbin]
/etc/amportal.conf writtenAssuming new install, --install-moh added to command line
OK
Reading /etc/amportal.conf…parsed amp_conf variables from /etc/amportal.conf:
amp_conf [AMPDBHOST] =[localhost]
amp_conf [AMPDBENGINE] =[mysql]
amp_conf [AMPENGINE] =[asterisk]
amp_conf [AMPMGRUSER] =[admin]
amp_conf [AMPMGRPASS] =[amp111]
amp_conf [AMPBIN] =[/var/lib/asterisk/bin]
amp_conf [AMPSBIN] =[/usr/local/sbin]
amp_conf [AMPWEBROOT] =[/srv/http/freepbx]
amp_conf [AMPCGIBIN] =[/var/www/cgi-bin ]
amp_conf [FOPWEBROOT] =[/var/www/html/panel]
amp_conf [FOPPASSWORD] =[passw0rd]
amp_conf [AUTHTYPE] =[database]
amp_conf [AMPEXTENSIONS] =[extensions]
amp_conf [AMPDBUSER] =[asteriskuser]
amp_conf [AMPDBPASS] =[amp109]
amp_conf [AMPWEBADDRESS] =[192.168.179.42]
amp_conf [AMPDBNAME] =[asterisk]
OK
Checking for /etc/asterisk/asterisk.conf…OK
Reading /etc/asterisk/asterisk.conf…OK
Using asterisk as PBX Engine
Checking for Asterisk version…12.3.2
Checking for selinux…OK
Connecting to database…OK
Checking current version of FreePBX…2.11.0rc1
Installing new FreePBX files…/etc/asterisk/cdr_mysql.conf has been changed from the original version.
Overwrite (y=yes/a=all/n=no/d=diff/s=shell/x=exit)? y
/etc/asterisk/manager.conf has been changed from the original version.
Overwrite (y=yes/a=all/n=no/d=diff/s=shell/x=exit)? y
OK (356 files copied, 26 skipped)
amportal…no fpbx…freepbx_engine…freepbx_setting…gen_amp_conf.php…done
apply username/password changes to conf files:
running apply_conf.sh from /etc/amportal.conf
Reading /etc/amportal.conf
Updating configuration…
/etc/asterisk/cdr_mysql.conf user: [asteriskuser] password: [amp109] hostname: [localhost]
/etc/asterisk/manager.conf user: [admin] secret: [amp111]
Adjusting File Permissions…
SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Done
done with apply_conf.sh
creating missing #include files…OK
Module ‘manager’ reloaded successfully.
Setting permissions on files…OK
Loading Bootstrap…OK
Checking for upgrades…9 found
Upgrading to 2.11.0…
-Running PHP script /usr/src/freepbx/upgrades/2.11.0/migration.php
Upgrading to 2.11.0…OK
Upgrading to 12.0.1alpha1…
-Running PHP script /usr/src/freepbx/upgrades/12.0.1alpha1/upgrade.php
Upgrading to 12.0.1alpha1…OK
Upgrading to 12.0.1alpha4…
-Running PHP script /usr/src/freepbx/upgrades/12.0.1alpha4/upgrade.php
Upgrading to 12.0.1alpha4…OK
Upgrading to 12.0.1alpha6…
-Running PHP script /usr/src/freepbx/upgrades/12.0.1alpha6/upgrade.php
Upgrading to 12.0.1alpha6…OK
Upgrading to 12.0.1alpha15…
-Running PHP script /usr/src/freepbx/upgrades/12.0.1alpha15/upgrade.php
Upgrading to 12.0.1alpha15…OK
Upgrading to 12.0.1alpha16…
-Running PHP script /usr/src/freepbx/upgrades/12.0.1alpha16/upgrade.php
Upgrading to 12.0.1alpha16…OK
Upgrading to 12.0.1alpha31…
-Running PHP script /usr/src/freepbx/upgrades/12.0.1alpha31/upgrade.php
Upgrading to 12.0.1alpha31…OK
Upgrading to 12.0.1alpha45…
-Running PHP script /usr/src/freepbx/upgrades/12.0.1alpha45/upgrade.php
Upgrading to 12.0.1alpha45…OK
Upgrading to 12.0.1beta10…
-Running PHP script /usr/src/freepbx/upgrades/12.0.1beta10/upgrade.php
Upgrading to 12.0.1beta10…OK
…OK
Setting freepbx settings form /etc/amportal.conf
freepbx setting [AMPDBHOST] DOES NOT EXIST, can’t set to [localhost]
freepbx setting [AMPDBENGINE] DOES NOT EXIST, can’t set to [mysql]
freepbx setting [AMPENGINE] set to [asterisk]
sed: -e expression #1, char 1: unknown command: `"'
freepbx setting [AMPMGRUSER] set to [admin]
PHP Notice: Undefined variable: db in /usr/src/freepbx/amp_conf/htdocs/admin/libraries/utility.functions.php on line 1163
freepbx setting [AMPMGRPASS] set to [amp111]
freepbx setting [AMPBIN] set to [/var/lib/asterisk/bin]
freepbx setting [AMPSBIN] set to [/usr/local/sbin]
freepbx setting [AMPWEBROOT] set to [/srv/http/freepbx]
freepbx setting [AMPCGIBIN] set to [/var/www/cgi-bin ]
freepbx setting [FOPWEBROOT] set to [/var/www/html/panel]
freepbx setting [FOPPASSWORD] DOES NOT EXIST, can’t set to [passw0rd]
freepbx setting [AUTHTYPE] set to [database]
freepbx setting [AMPEXTENSIONS] set to [extensions]
freepbx setting [AMPDBUSER] DOES NOT EXIST, can’t set to [asteriskuser]
freepbx setting [AMPDBPASS] DOES NOT EXIST, can’t set to [amp109]
freepbx setting [AMPWEBADDRESS] set to [192.168.179.42]
freepbx setting [AMPDBNAME] DOES NOT EXIST, can’t set to [asterisk]
freepbx setting [ASTETCDIR] set to [/etc/asterisk]
freepbx setting [ASTMODDIR] set to [/usr/lib/asterisk/modules]
freepbx setting [ASTVARLIBDIR] set to [/var/lib/asterisk]
freepbx setting [ASTAGIDIR] set to [/var/lib/asterisk/agi-bin]
freepbx setting [ASTSPOOLDIR] set to [/var/spool/asterisk]
freepbx setting [ASTRUNDIR] set to [/run/asterisk]
freepbx setting [ASTLOGDIR] set to [/var/log/asterisk]
freepbx setting [FPBXDBUGFILE] set to [/var/log/asterisk/freepbx_debug]
Generating AMP configs…
Generating Configurations.conf, (if Asterisk is not running, you will get an error)
In case of error, start Asterisk and hit the red bar in the GUI to generate the Configurations.conf files
PHP Fatal error: Uncaught exception ‘PDOException’ with message ‘could not find driver’ in /srv/http/freepbx/admin/libraries/BMO/Database.class.php:62
Stack trace:
#0 /srv/http/freepbx/admin/libraries/BMO/Database.class.php(62): PDO->__construct(‘mysql:host=loca…’, ‘asteriskuser’, ‘amp109’)
#1 /srv/http/freepbx/admin/libraries/BMO/Self_Helper.class.php(116): Database->__construct(Object(FreePBX))
#2 /srv/http/freepbx/admin/libraries/BMO/Self_Helper.class.php(36): Self_Helper->autoLoad(‘Database’)
#3 /srv/http/freepbx/admin/libraries/BMO/DB_Helper.class.php(47): Self_Helper->__get(‘Database’)
#4 /srv/http/freepbx/admin/libraries/BMO/DB_Helper.class.php(184): DB_Helper::checkDatabase()
#5 /srv/http/freepbx/admin/libraries/BMO/Hooks.class.php(96): DB_Helper->setConfig(‘hooks’, Array)
#6 /var/lib/asterisk/bin/retrieve_conf(20): Hooks->updateBMOHooks()
#7 {main}
thrown in /srv/http/freepbx/admin/libraries/BMO/Database.class.php on line 62
Generating AMP configs…OK
Framework has been detected as being in Developer mode, Please make sure to run ‘./install_amp --update-links’ manually so that any database or system settings can be updated
Module framework successfully installed
SETTING FILE PERMISSIONS
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
Please update your modules and reload Asterisk by visiting http://192.168.179.42/admin