I am trying to install Freepbx 2.2.1 on Centos 4.4 using Asterisk 1.2.15. Ive followed the documentation but i am getting errors during the installation Process . Here is a copy of my install :-
[root@asterisk ~]# cd /usr/src/freepbx-2.2.1
[root@asterisk freepbx-2.2.1]# ./install_amp
Checking for PEAR DB…OK
Checking for PEAR Console::Getopt…OK
Checking user…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] DB Password is Here
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]
Enter the IP ADDRESS or hostname used to access the AMP web-admin:
[xx.xx.xx.xx] 192.168.32.222
Enter a PASSWORD to perform call transfers with the Flash Operator Panel:
[passw0rd]
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/sbin]
/etc/amportal.conf writtenAssuming new install, --install-moh added to command line
OK
Reading /etc/amportal.conf…OK
Checking for /etc/asterisk/asterisk.conf…OK
Reading /etc/asterisk/asterisk.conf…OK
Using asterisk as PBX Engine
Checking for Asterisk 1.2…OK
Checking for selinux…OK
Connecting to database…OK
Checking current version of AMP…2.2.1
Installing new AMP files…OK
Configuring install for your environment…OK
Setting permissions on files…OK
Checking for upgrades…0 found
Generating AMP configs…
Generating Configurations.conf…
Content-type: text/html
X-Powered-By: PHP/4.3.9
Checking for PEAR DB…OK
Checking for PEAR Console::Getopt…OK
Running module install.php and install.sql scripts
Checking for /etc/amportal.conf…OK
Reading /etc/amportal.conf…PHP Warning: file(/etc/amportal.conf): failed to open stream: Permission denied in /var/lib/asterisk/bin/retrieve_conf on line 41
PHP Warning: Invalid argument supplied for foreach() in /var/lib/asterisk/bin/retrieve_conf on line 42
OK
Reading /etc/asterisk/asterisk.conf…OK
Connecting to database…PHP Notice: Undefined index: AMPDBUSER in /var/lib/asterisk/bin/retrieve_conf on line 199
PHP Notice: Undefined index: AMPDBPASS in /var/lib/asterisk/bin/retrieve_conf on line 200
PHP Notice: Undefined index: AMPDBHOST in /var/lib/asterisk/bin/retrieve_conf on line 201
FAILED
[FATAL] Cannot connect to database
Generating AMP configs…OK
Restarting Flash Operator Panel…op_server.pl: no process killed
OK
Please update your modules and reload Asterisk by visiting http://192.168.32.222/admin
- Note: It’s possible that if you click the red ‘Update Now’ bar BEFORE *
- updating your modules, your machine will start dropping calls. Ensure *
- that all modules are up to date BEFORE YOU CLICK THE RED BAR. As long *
- as this is observed, your machine will be fully functional whilst the *
- upgrade is in progress. *
When i try to browse to the Freepbx GUI i can see teh front Page but when i click on admin i get :-
Missing or unreadable config file (/etc/amportal.conf)…cannot continue
My file is below :-
This file contains settings for components of the Asterisk Management Portal
Spaces are not allowed!
Run /usr/src/AMP/apply_conf.sh after making changes to this file
AMPDBHOST: the host to connect to the database named ‘asterisk’
AMPDBHOST=localhost
AMPDBUSER: the user to connect to the database named ‘asterisk’
AMPDBUSER=asteriskuser
AMPDBENGINE: the type of database to use
AMPDBENGINE=mysql
AMPDBPASS: the password for AMPDBUSER
AMPDBPASS=jtsadmin2369
AMPENGINE: the telephony backend engine to use
AMPENGINE=asterisk
AMPMGRUSER: the user to access the Asterisk manager interface
AMPMGRUSER=admin
AMPMGRPASS: the password for AMPMGRUSER
AMPMGRPASS=amp111
AMPBIN: where command line scripts live
AMPBIN=/var/lib/asterisk/bin
#AMPSBIN: where (root) command line scripts live
AMPSBIN=/usr/sbin
AMPWEBROOT: the path to Apache’s webroot (leave off trailing slash)
AMPWEBROOT=/var/www/html
AMPCGIBIN: the path to Apache’s cgi-bin dir (leave off trailing slash)
AMPCGIBIN=/var/www/cgi-bin
AMPWEBADDRESS: the IP address or host name used to access the AMP web admin
#AMPWEBADDRESS=192.168.1.101
AMPWEBADDRESS=192.168.32.222
FOPWEBROOT:web root for the Flash Operator Panel
FOPWEBROOT=/var/www/html/panel
FOPPASSWORD: the secret code for performing transfers and hangups in the Flash Operator Panel
FOPPASSWORD=passw0rd
FOPSORT: FOP should sort extensions by Last Name [lastname] or by Extension [extension]
FOPSORT=extension
AUTHTYPE: authentication type to use for web admin
If type set to ‘database’, the primary AMP admin credentials will be the AMPDBUSER/AMPDBPASS above
valid: none, database
AUTHTYPE=database
AMPADMINLOGO: Defines the logo that is to be displayed at the TOP LEFT of the admin screen.
This enables you to customize the look of the administration screen.
NOTE: images need to be saved in the …/admin/images directory of your AMP install
This image should be 55px in height
AMPADMINLOGO=freepbx.png
AMPFOOTERLOGO: Defines the logo that is to be displayed at the BOTTOM RIGHT of the admin screen.
This enables you to customize the look of the administration screen.
NOTE: images need to be saved in the …/admin/images directory of your AMP install
This image should be 40px in height
AMPFOOTERLOGO=blank.gif
AMPADMINHREF: Defines the where a user is taken if they click on the footer logo
This enables you to customize the look of the administration screen.
USECATEGORIES: Controls if the menu items in the admin interface are sorted by category (true),
or sorted alphebetically with no categories shown (false). Defaults to true.
#USECATEGORIES=false
AMPEXTENSIONS: the type of view for extensions admin
If set to ‘deviceanduser’ Devices and Users will be administered seperately, and Users will be able to “login” to devices.
If set to ‘extensions’ Devices and Users will me administered in a single screen.
AMPEXTENSIONS=extensions
POST_RELOAD: automatically execute a script after applying changes in the AMP admin
Set POST_RELOAD to the script you wish to execute after applying changes
If POST_RELOAD_DEBUG=true, you will see the output of the script in the web page
POST_RELOAD=
POST_RELOAD_DEBUG=false
ENABLECW: Enable call waiting by default when an extension is created
Set to ‘yes’ it automatically creates the ‘CW’ key to enable call waiting, not
requiring the user to dial *70 when their phone is first commissioned
ENABLECW=yes
The following are used to optionally have the freepbx backup program optionally
send the generated backup to an ftp server
FTPBACKUP=YES to enable
FTPUSER, FTPPASSWORD, FTPSERVER must be set
FTPSUBDIR is an optional subdirectory at the ftp server, it will cause ftp to do a cd
There is no error checking so you should check to make sure these are set correctly. The
ftp is saved after the backup, so it will not cause the local backup file to be effected
FTPBACKUP=yes
#FTPUSER=asterisk
#FTPPASSWORD=password
#FTPSUBDIR=mybackupfolder
#FTPSERVER=myftpserver
AMPMODULEXML lets you change the module repository that you use. By default, it
should be set to http://mirror.freepbx.org/ - Presently, there are no third
party module repositories.
AMPMODULEXML=http://mirror.freepbx.org/
AMPMODULESVN is the prefix that is appended to tags in the XML file.
This should be set to http://mirror.freepbx.org/modules/
AMPMODULESVN=http://mirror.freepbx.org/modules/
AMPMODULEMSG is URL used to search for warnings or messages in the online repository
and should not be changed.
AMPMODULEMSG=http://mirror.freepbx.org/
AMPDBNAME=asterisk
ASTETCDIR=/etc/asterisk
ASTMODDIR=/usr/lib/asterisk/modules
ASTVARLIBDIR=/var/lib/asterisk
ASTAGIDIR=/var/lib/asterisk/agi-bin
ASTSPOOLDIR=/var/spool/asterisk
ASTRUNDIR=/var/run/asterisk
ASTLOGDIR=/var/log/asterisk
Regards,
Daniel.