StillLearning wrote:
[quote] Hi All,
I am trying to setup FreePBX on CentOS-4.4, I started with the installation of CentOS 4.3 and did all the upgrades, which upgraded to CentOS-4.4, I have followed ROB’s CentOS-4.3 Installation Walkthrough but stuck with the error below, I have rechecked my entries several times and have now done about 4 installs but get the same error. Rob has made this post [quote] Connecting to database…FAILED
Try running ./install_amp --username=user --password=pass (using your own user and pass)
FATAL Cannot connect to database
root@rob-laptop:/usr/src/freepbx#
It means that you haven’t done the ‘GRANT ALL PRIVILEGES …’ command in MySQL, or, you’ve put the wrong password in when you were doing the installation /quote]
What am I doing wrond here?? Please help
[/quote]
I’ve attached my cheat sheet. It probably could use updating a little
but hopefully it will help… Also note that I use a modified Amportal
startup script that is RPM aware so you might want to skip the part
about linking /etc/init.d/amportal and running chkconfig to activate it
on boot.
Andrew
+-+-+-+-+-+ +-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+
|L|i|n|u|x| |S|y|s|t|e|m|s| |E|n|g|i|n|e|e|r|s|
+-+-+-+-+-+ +-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+
_ _ _____ _
| | (_) / ____| | |
| | _ _ __ _ ___ __ | (___ _ _ ___| |_ ___ _ __ ___ ___
| | | | '_ \| | | \ \/ / \___ \| | | / __| __/ _ \ '_ ` _ \/ __|
| |____| | | | | |_| |> < ____) | |_| \__ \ || __/ | | | | \__ \
|______|_|_| |_|\__,_/_/\_\ |_____/ \__, |___/\__\___|_| |_| |_|___/
__/ |
|___/
______ _
| ____| (_)
| |__ _ __ __ _ _ _ __ ___ ___ _ __ ___
| __| | '_ \ / _` | | '_ \ / _ \/ _ \ '__/ __|
| |____| | | | (_| | | | | | __/ __/ | \__ \
|______|_| |_|\__, |_|_| |_|\___|\___|_| |___/
__/ | ( I N C )
|___/
AMP INSTALLATION INSTRUCTIONS - CentOS 4.0
-
This document is largely derived from the INSTALL document that is
provided in the AMP tarball.
-
Please read all of the documentation that comes with AMP
-
send comments / questions regarding the installation document to
[email protected]
Software Prerequisites
##########################
Ensure that the following Centos packages are installed:
curl sox httpd mysql mysql-server php php-pear php-mysql openssl
perl bison libtiff-devel openssl-devel mysql-devel ncurses-devel
audiofile-devel
Install the following LSE packages:
asterisk asterisk-addons asterisk-sounds asterisk-zaptel
asterisk-libpri lame perl-asterisk-perl perl-IPC-Signal
perl-Net-Telnet perl-Proc-WaitStat perl-mime-construct
If using zaptel modules install the matching kernel and reboot the system
to activate it.
Once the above RPMS’s are installed, proceed with installing AMP from the
distribution tarball which is available from:
http://sourceforge.net/projects/amportal
Setting up the environment
##############################
AMP requires the following changes to php and apache for uploading new MOH
files:
- vi +501 /etc/php.ini
upload_max_filesize=20M
- vi +20 /etc/httpd/conf.d/php.conf
LimitRequestBody 20000000
- you might also need to set register_globals = on in the php.ini for
displaying CDR logs in the AMP interface
Two new databases must be created in MySQL:
- start mysqld with "service mysqld start"
- mysqladmin -u root password 'db_root_pwd'
- mysqladmin create asteriskcdrdb -p
- mysql --user=root --password=db_root_pwd -p asteriskcdrdb \
< {AMP_source_directory}/SQL/cdr_mysql_table.sql
- mysqladmin create asterisk -p
- mysql --user root -p asterisk \
< {AMP_source_directory}/SQL/newinstall.sql
Grant access to these two databases you just created
- Note the default mysql username/password is asteriskuser/amp109.
- If you change either of these, you will be prompted for them while
running ./install below
- mysql --user root -p
mysql> GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO
asteriskuser@localhost IDENTIFIED BY 'amp109';
Query OK, 0 rows affected (0.00 sec)
mysql> GRANT ALL PRIVILEGES ON asterisk.* TO
asteriskuser@localhost IDENTIFIED BY 'amp109';
Query OK, 0 rows affected (0.00 sec)
mysql> quit
Modify the asterisk user account so that it may be logged in to:
usermod -s /bin/bash asterisk
Modify zaptel configuration files:
- Edit /etc/sysconfig/zaptel and comment out every "MODULE=" statement
that is not needed.
- Edit /etc/zaptel.conf to reflect installed Digium telephony card(s).
Only the parameters/values relevant to a wildcard XP100 FXO card are
included below:
fxsks=1
loadzone=us
defaultzone=us
Only the parameters/values relevant to a TDM400P with 4 FXO modules are
included below:
fxsks=1-4
loadzone=us
defaultzone=us
Only the parameters/values relevant to a TE110P (T1 configuration) are
included below:
span=1,1,0,esf,b8zs
bchan=1-23
dchan=24
loadzone=us
defaultzone=us
- Start zaptel
service zaptel start [ OK ]
ztcfg -v
Configuration
======================
1 channels configured.
If you get a warning about unable to open master device /dev/zap/ctl,
that's ok. It's a result of the zaptel module(s) not loaded yet.
Detailed information with regard to Asterisk's configuration files can
be found here:
http://voip-info.org/wiki-Asterisk+config+files
Configure zapata module
- edit /etc/asterisk/zapata.conf to reflect installed digium interfaces
(see zapata.conf.template)
Only the parameters/values relevant to a Wildcard XP100 FXO card are
included below:
[channels]
language=en
context=from-pstn
signalling=fxs_ks
faxdetect=incoming
usecallerid=yes
callerid=asreceived
echocancel=yes
callprogress=no
busydetect=no
echocancelwhenbridged=no
echotraining=800
group=0
channel=1
Only the parameters/values relevant to a TDM400P with 4 FXO modules are
included below:
[channels]
language=en
context=from-pstn
signalling=fxs_ks
faxdetect=incoming
usecallerid=yes
callerid=asreceived
echocancel=yes
callprogress=no
busydetect=no
echocancelwhenbridged=no
echotraining=800
group=0
channel=1-4
Only the parameters/values relevant to a TE110P (T1 configuration) are
included below:
[channels]
language=en
context=from-pstn
switchtype=national
pridialplan=national
signalling=pri_cpe
faxdetect=incoming
usecallerid=yes
echocancel=yes
callerid=asreceived
echocancelwhenbridged=no
echotraining=800
group=0
channel=1-23
Note: if your configuration is using zap channels as FXS endpoints,
zapata.conf must contain the following line in order to provision these
endpoints in AMP's Extensions admin: #include zapata_additional.conf
Configure httpd (Apache):
- Edit /etc/httpd/conf/httpd.conf so that:
User asterisk
Group asterisk
- You should secure your AMP admin directory by creating the
file /etc/httpd/conf.d/amp.conf and adding:
#Password protect AMP admin
<Directory /var/www/html/admin>
AuthType Basic
AuthName "Restricted Area"
AuthUserFile /var/www/amppasswd
Require user wwwadmin
</Directory>
- now create the password file:
htpasswd -c /var/www/amppasswd wwwadmin
Finally, run the “install” script to install all the AMP files:
- /usr/src/AMP/install_amp
Amportal Control Script
##############################
A script to start and stop AMP is located in /usr/sbin. On CentOS /
RedHat systems, the script should be modified so that the system
controls starting and stopping the service on boot / shutdown. Edit
the script and insert the following after the first line:
#
# chkconfig: 2345 45 55
# description: Startup / Shutdown Asterisk Management Portal
Once the script is modified, link the file to /etc/init.d and run
chkconfig to add the service to the init scripts.
ln -s /usr/sbin/amportal /etc/init.d/amportal
chkconfig amportal --add
Auto Start
##############################
To ensure the system will load after a reboot:
- As root run:
chkconfig mysqld on
chkconfig httpd on
chkconfig amportal on
chkconfig zaptel on
chkconfig asterisk on
- The system will now start and stop AMP automatically on each reboot.
- To start amportal and asterisk without rebooting, run:
service mysql start
service httpd start
service zaptel start
service asterisk start
service amportal start
- Point your browser to:
http://[ip address]
- End of installation instructions
==== install_amp LOG ==========================================================
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]
Enter the path to use for your FOP web root:
[/var/www/html/panel]
Created /var/www/html/panel
Enter the path to your Apache cgi-bin:
[/var/www/cgi-bin]
Enter the IP ADDRESS or hostname used to access the AMP web-admin:
[xx.xx.xx.xx] 192.168.1.x
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/sbin]
/etc/amportal.conf writtenOK
Reading /etc/amportal.conf…OK
Checking for /etc/asterisk/asterisk.conf…OK
Reading /etc/asterisk/asterisk.conf…OK
Connecting to database…OK
Checking current version of AMP…1.10.010
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 extensions_additional.conf…
Generating sip_additional.conf…
No sip accounts defined in sip
Generating zap_additional.conf…
No zap accounts defined in zap
Generating iax_additional.conf…
No iax accounts defined in iax
Generating meetme_additional.conf…
No extensions defined in extensions
Generating queues_additional.conf…
No queues defined in queues
Generating op_buttons_additional.conf…
Notice: no devices defined
Notice: no Queues defined
Notice: no sip trunks defined
Notice: no iax trunks defined
Notice: no AMP Users defined
Generating AMP configs…OK
Restarting Flash Operator Panel…op_server.pl: no process killed
OK
Please Reload Asterisk by visiting http://192.168.1.x/admin
==== install_amp LOG ==========================================================
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Amportal-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amportal-users
Post generated using Mail2Forum (http://www.mail2forum.com)