Problems installing Asterisk + FreePBX on a Remote Server

Hi,

I really need your help on this. I was installing Asterisk + FreePBX on a remote server running CentOS 5.3. I followed the procedure outlined avbove but when I ran the “./install_amp --username=asteriskuser --password=SOMEPASSWORD” I kept getting this:

[[email protected] freepbx-2.5.0]# ./install_amp --username=asteriskuser --password=amp109
Checking for PEAR DB…OK
Checking for PEAR Console::Getopt…OK
Using username: asteriskuser
Using password: ******
Checking user…OK
Checking if Asterisk is running…running with PID: 25473…OK
Checking for /etc/amportal.conf…OK
Reading /etc/amportal.conf…OK
Checking for /etc/asterisk/asterisk.conf…/etc/asterisk/asterisk.conf does not exist, copying default
PHP Warning: copy(): SAFE MODE Restriction in effect. The script whose uid/gid is 0/0 is not allowed to access /etc/asterisk owned by uid/gid 500/500 in /usr/src/freepbx-2.5.0/install_amp on line 817
PHP Warning: copy(/etc/asterisk/asterisk.conf): failed to open stream: No such file or directory in /usr/src/freepbx-2.5.0/install_amp on line 817
OK
Reading /etc/asterisk/asterisk.conf…PHP Warning: file(): Unable to access /etc/asterisk/asterisk.conf in /usr/src/freepbx-2.5.0/install_amp on line 159
PHP Warning: file(/etc/asterisk/asterisk.conf): failed to open stream: No such file or directory in /usr/src/freepbx-2.5.0/install_amp on line 159
PHP Warning: Invalid argument supplied for foreach() in /usr/src/freepbx-2.5.0/install_amp on line 160
PHP Notice: Undefined variable: conf in /usr/src/freepbx-2.5.0/install_amp on line 176
[FATAL] FAILED. Have you installed Asterisk?

Although asterisk was installed and running but getting freepbx installed on it is the challenge.

Please help!

It looks like you have PHP safe mode enabled. Try disabling it in /etc/php.ini and run install_amp again.

Thank you so much for your contribution.

I tried it the way you advised and yet I got the following error:

[[email protected] freepbx-2.5.0]# ./install_amp --username=asteriskuser --password=passw0rd
Checking for PEAR DB…OK
Checking for PEAR Console::Getopt…OK
Using username: asteriskuser
Using password: ********
Checking user…OK
Checking if Asterisk is running…running with PID: 25028…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:
[passw0rd]
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] 85.25.236.208
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]

Created /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…OK
Checking for /etc/asterisk/asterisk.conf…/etc/asterisk/asterisk.conf does not exist, copying default
OK
Reading /etc/asterisk/asterisk.conf…OK
Using asterisk as PBX Engine
sh: /asterisk: No such file or directory
[FATAL] Error executing asterisk: be sure Asterisk is installed and in the path

What can I do to solve this error? Please remember that I followed the procedure as outlined on this page- http://www.freepbx.org/support/documentation/installation/install-process-for-centos-5-1

Thanks.

Thank you so much for your contribution.

I tried it the way you advised but I still got this error below:

[[email protected] freepbx-2.5.0]# ./install_amp --username=asteriskuser --password=passw0rd
Checking for PEAR DB…OK
Checking for PEAR Console::Getopt…OK
Using username: asteriskuser
Using password: ********
Checking user…OK
Checking if Asterisk is running…running with PID: 25028…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:
[passw0rd]
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] 85.25.236.208
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]

Created /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…OK
Checking for /etc/asterisk/asterisk.conf…/etc/asterisk/asterisk.conf does not exist, copying default
OK
Reading /etc/asterisk/asterisk.conf…OK
Using asterisk as PBX Engine
sh: /asterisk: No such file or directory
[FATAL] Error executing asterisk: be sure Asterisk is installed and in the path

What can I do to solve this error? Please remember that I followed the procedure as outlined on this page- http://www.freepbx.org/support/documentation/installation/install-proces

Thanks.

Hi,

Please disregard the message earlier posted. This is the latest:

I was able to disable the Safe Mode in /etc/php.ini, and the install_amp ram successfully. But when I opened the web-page and clicked on “FreePBX Administration” or any other hyperlink, I gor this message-

Forbidden

You don’t have permission to access /admin/ on this server.

Apache/2.2.3 (Red Hat) Server at xx.xx.xx.xx Port 80

Please help me!

Thanks

Is asterisk running? It does not look like it.