I have been able to install debian squeeze on my sdcard and have worked my way through installing asterisk.
I actually have gotten all the way thru to the end of the freepbx installation.
I can start asterisk using ./start_asterisk start, but when I after I install freepbx I get...
root@debian:/usr/src/freepbx-2.7.0# amportal start
SETTING FILE PERMISSIONS
Permissions OK
STARTING ASTERISK
Asterisk ended with exit status 1
Asterisk died with code 1.
Automatically restarting Asterisk.
Asterisk ended with exit status 1
Asterisk died with code 1.
Automatically restarting Asterisk.
Here is my running install log AFTER debian squeeze install....
********************************
apt-get install update
apt-get -y dist-upgrade
apt-get install gcc
apt-get -y install debconf-utils
apt-get -y install apache2 php5 php5-cli php-pear php-db libapache2-mod-php5 php5-gd php5-curl libncurses5-dev
cd /var/www/
-- check php setup
vi test.php
<?php phpinfo(); ?>
/etc/init.d/apache2 restart
-- check php setup
apt-get -y install mysql-server-5.1 mysql-client php5-mysql libmysqlclient-dev
if mysql did not ask you to set a root password then:
mysql -u root -p
mysql> USE mysql;
mysql> UPDATE user SET Password=PASSWORD('newpass') WHERE
user='root';
mysql> FLUSH PRIVILEGES;
mysql> exit
apt-get -y install asterisk asterisk-dev asterisk-dbg
ITU-T telephone code: 61
cd /tmp
wget
http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-addons-1.6.2-current.tar.gzcd /usr/src
tar zxvf /tmp/asterisk-addons-1.6.2-current.tar.gz
cd asterisk*
./configure
make menuselect
Selections: app_addon_sql_mysql on cdr_addon_mysql on [ ] chan_ooh323 off
- format_mp3 on
- res_config_mysql on
x to save and exit
make
make install
cd /tmp
wget
http://mirror.freepbx.org/freepbx-2.7.0.tar.gzcd /usr/src
tar zxvf /tmp/freepbx-2.7.0.tar.gz
chmod 755 /etc/init.d/asterisk
update-rc.d asterisk defaults 90 10
# configure freepbx
cd freepbx-${FREEPBX_VERSION}
# setup databases for freepbx use
mysqladmin -u root -p create asterisk
mysqladmin -u root -p create asteriskcdrdb
mysql -u root -p asterisk < SQL/newinstall.sql
mysql -u root -p asteriskcdrdb < SQL/cdr_mysql_table.sql
mysql -u root -p
enter password
mysql>GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY "password";
mysql>GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY "password";
mysql>flush privileges;
mysql>exit
# reconfigure php for freepbx
cp /etc/php5/apache2/php.ini /etc/php5/apache2/php.ini-orig
sed -i "s/\(upload_max_filesize *= *\)\(.*\)/\120M/" /etc/php5/apache2/php.ini
sed -i "s/\(memory_limit *= *\)\(.*\)/\1100M/" /etc/php5/apache2/php.ini
sed -i "s/\(magic_quotes_gpc *= *\)\(.*\)/\1Off/" /etc/php5/apache2/php.ini
# fix up directory use and permissions for asterisk
mkdir /var/run/asterisk
chown asterisk:asterisk /var/run/asterisk
chown asterisk:asterisk -R /etc/asterisk
chown asterisk:asterisk -R /var/lib/asterisk
# chmod a+x /var/lib/asterisk/bin/*
chown asterisk:asterisk -R /var/log/asterisk
chown asterisk:asterisk -R /var/spool/asterisk
chown asterisk:asterisk -R /var/www
sed -i "s/\[directories\](!) .*/[directories]/" /etc/asterisk/asterisk.conf **Event not found**
sed -i "s|astrundir *=> */var/run|astrundir => /var/run/asterisk|" /etc/asterisk/asterisk.conf
#fix mohmp3
mkdir /var/lib/asterisk/mohmp3
chmod 775 /var/lib/asterisk/mohmp3
chown asterisk:asterisk /var/lib/asterisk/mohmp3
# start asterisk
./start_asterisk start
# configure amportal
cp amportal.conf /etc/amportal.conf
# Username should come before password in cdr_mysql.cof - seems to cause issues, you might have to manually edit after fact and invert entry order
sed -i "s/# \(AMPDBUSER=asteriskuser\) */\1/" /etc/amportal.conf
sed -i "s/# \(AMPDBPASS=\).*/\1password/" /etc/amportal.conf
sed -i "s|\(AMPWEBROOT=\)/var/www/html|\1/var/www|" /etc/amportal.conf
sed -i "s|\(FOPWEBROOT=\)/var/www/html/panel|\1/var/www/panel|" /etc/amportal.conf
#sed -i "/#AMPWEBADDRESS=/d" /etc/amportal.conf
sed -i "s/AMPWEBADDRESS=/AMPWEBADDRESS=${IP_ADDRESS}/" /etc/amportal.conf ///AMPWEBADDRESS=
#Fix corrupted Pear PHP Channels and Fault Symlink present in PHP 5.9+?
install DB module **Doesn't do anything**
# Freshen Up PHP install
apt-get -y remove php-pear **Never had installed**
apt-get -y install php-pear
rm -rf /usr/share/php/.channels **had to had rm -rf to remove directory **
pear update-channels
rm -f /usr/share/php/doc
ln -s /usr/share/doc/php-pear/ /usr/share/php/doc
pear install DB
cd /usr/src/freepbx-${FREEPBX_VERSION}
# install amp
./install_amp
cp /var/lib/asterisk/moh/*.wav /var/lib/asterisk/mohmp3/ ** No wav files in moh **
# start apache web server
/etc/init.d/apache2 restart
# start amportal
amportal start
**********************
So something in the freepbx config seems to breaking asterisk. At least that is what it seems to me. Cause I can issue the original asterisk start command BEFORE installing freepbx and it asterisk will not complain. AFTER installing Freepbx, I get the error above.
Apparently, it is a very generic error, as I have not found any specific google help. I have check the /var/log/asterisk/full logs and there are a few errors but they don't seem to be related.
ERROR[20617] res_config_pgsql.c: PostgreSQL RealTime: Failed to connect database asterisk on 127.0.0.1:
ERROR[20617] res_config_ldap.c: No directory URL or host found.
ERROR[20617] codec_dahdi.c: Failed to open /dev/dahdi/transcode: No such file or directory
ERROR[20617] pbx.c: Function MAILBOX_EXISTS already registered.
I am not using Postgres, LDAP, or Dahdi card so I don't know why those would cause the start issues.
Anyone have any ideas?