Aqui tienes un script que hice para instalarlo en Elastix. Debería
funcionar en CentOS (aunque Elastix usa Postfix y no sendmail).
De todas formas ya ha salido alguna versión nueva:
yum install -y php-pear php-mysql php-mbstring netpbm-progs php-pecl-
Fileinfo ImageMagick-devel libungif libpng sudo libtiff ghostscript
ghostscript-fonts ImageMagick expect
pear channel-update
pear.php.net
pear upgrade-all
pear install db MDB2 Mail Net_SMTP Mail_mime MDB2_driver_mysql
cd /usr/src
wget
http://dfn.dl.sourceforge.net/sourceforge/avantfax/avantfax-3.0.5.tgz
tar xfvz avantfax-3.0.5.tgz
cd avantfax-3.0.5
chown -R asterisk:asterisk avantfax
chmod 0770 avantfax/includes/templates/admin_theme/templates_c/
avantfax/includes/templates/admin_theme/cache/ avantfax/includes/
templates/main_theme/templates_c/ avantfax/includes/templates/
main_theme/cache/
chown asterisk:asterisk avantfax/includes/templates/admin_theme/
templates_c/ avantfax/includes/templates/admin_theme/cache/ avantfax/
includes/templates/main_theme/templates_c/ avantfax/includes/templates/
main_theme/cache/
chmod 0755 avantfax/includes/faxcover.php avantfax/includes/
faxrcvd.php avantfax/includes/notify.php avantfax/tools/
update_contacts.php avantfax/tools/faxcover.php avantfax/includes/
avantfaxcron.php
mv avantfax /var/www/html
# Create mysql avantfax user and databse
# mysql --user=root --password=eLaStIx.2oo7 -e "GRANT ALL ON avantfax
TO avantfax@localhost IDENTIFIED BY \"d58fe49\"" mysql
# mysqladmin --default-character-set=utf8 --user=avantfax --
password=d58fe49 create avantfax
mysql -uroot -peLaStIx.2oo7 < create_user.sql
mysql -uavantfax -pd58fe49 avantfax < create_tables.sql
mysqlshow --user=avantfax --password=d58fe49 avantfax
# Copy default configuration
cd /var/www/html/avantfax/includes/
cp -a local_config-example.php local_config.php
chmod -R 777 /var/www/html/avantfax/tmp
chmod -R 777 /var/www/html/avantfax/faxes
cd /var/spool/hylafax/bin
mv faxrcvd faxrcvd.old
mv notify notify.old
ln -s /var/www/html/avantfax/includes/faxrcvd.php /var/spool/hylafax/
bin/faxrcvd.php
ln -s /var/www/html/avantfax/includes/notify.php /var/spool/hylafax/
bin/notify.php
mv /usr/bin/faxcover /usr/bin/faxcover.old
ln -s /var/www/html/avantfax/includes/faxcover.php /usr/bin/faxcover
/usr/sbin/faxadduser -a pwd asterisk
/usr/sbin/faxdeluser localhost
/usr/sbin/faxdeluser 127.0.0.1
echo 127.0.0.1 >> /var/spool/hylafax/etc/hosts.hfaxd
echo 'JobFmt: "%-3j %3i %1a %15o %40M %-12.12e %5P %5D %7z %.25s"' >> /
etc/hylafax/hyla.conf
echo "Disabling SELinux for Apache"
setsebool -P httpd_disable_trans 1
cat > /etc/httpd/conf.d/avantfax.conf << EOF
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot /var/www/html/avantfax/
ServerName avantfax
</VirtualHost>
EOF
ln -s /usr/share/file/magic* /usr/share/misc/
# SETUP SUDO PERMISSIONS
echo "Setting up sudo"
cat /etc/sudoers | grep -v requiretty > /tmp/sudoers
echo "asterisk ALL= NOPASSWD: /sbin/reboot, /sbin/halt, /usr/sbin/
faxdeluser, /usr/sbin/faxadduser -u * -p * *" >> /tmp/sudoers
mv /etc/sudoers /etc/sudoers.orig
mv /tmp/sudoers /etc/sudoers
chmod 0440 /etc/sudoers
# CONFIGURE MODEMS TO USE AVANTFAX
for i in `ls /var/spool/hylafax/etc/config.tty*`; do
if [ ! -L $i ]; then
cat >> $i << EOF
#
## AvantFAX
#
FaxrcvdCmd: bin/faxrcvd.php
EOF
fi
done
cat >> /var/spool/hylafax/etc/config << EOF
#
## AvantFAX
#
NotifyCmd: bin/notify.php
EOF
# ADD MODEMS TO INITTAB
cat >> /etc/inittab << EOF
#
## AvantFAX
#
EOF
# CREATE AN INITTAB ENTRY FOR EACH CONFIGURED MODEM
cnt=0
for i in `ls /var/spool/hylafax/etc/config.tty*`; do
if [ -f $i ]; then
modem=`echo $i | awk -F'/' '{print $6}' | awk -F'.' '{print $2}'`
let "cnt++"
# ADD MODEMS TO AVANTFAX DATABASE
mysql --user=avantfax --password=d58fe49 -e "INSERT INTO Modems SET
device='$modem', alias ='$modem'" avantfax
echo "Configuring $modem for AvantFAX"
fi
done
cat > /etc/hylafax/faxmail.conf << EOF
AutoCoverPage: false
TextPointSize: 12pt
Headers: Message-id Date Subject From
MailUser: faxmail
EOF
# ADD CRONTAB ENTRIES
echo "Setting up crontab"
mkdir /tmp
crontab -l > /tmp/tab
echo -e "0 * * * *\t/var/www/html/avantfax/includes/phb.php" >> /tmp/
tab
echo -e "0 0 * * *\t/var/www/html/avantfax/includes/avantfaxcron.php -
t 2" >> /tmp/tab
crontab /tmp/tab
rm -f /tmp/tab
# Thanks to Saleh for this solution to the blank page
cd /var/www/html/avantfax/includes
touch ampuser.php
chown asterisk:asterisk ampuser.php
cd
# Restart services
service httpd restart
service iaxmodem restart
service hylafax restart
amportal restart
# Import existing faxes
cd /var/spool/hylafax; for i in `ls recvq/*`; do bin/faxrcvd.php $i
ttyIAX1; done
cd /var/spool/hylafax; for i in `ls doneq/q*`; do bin/notify.php $i
done :30; done
# Install OCR support
cd /usr/src
wget
http://tesseract-ocr.googlecode.com/files/tesseract-2.01.tar.gz
tar xfvz tesseract-2.01.tar.gz
cd tesseract-2.01
./configure && make
wget
http://tesseract-ocr.googlecode.com/files/tesseract-2.00.spa.tar.gz
wget
http://tesseract-ocr.googlecode.com/files/tesseract-2.00.eng.tar.gz
tar xfvz tesseract-2.00.spa.tar.gz
tar xfvz tesseract-2.00.eng.tar.gz
make install
mv /var/www/html/avantfax/includes/local_config.php /var/www/html/
avantfax/includes/local_config.php.backup
sed "s/'ENABLE_OCR_SUPPORT', false/'ENABLE_OCR_SUPPORT', true/g" /var/
www/html/avantfax/includes/local_config.php.backup > /var/www/html/
avantfax/includes/local_config.php
rm -rf /var/www/html/avantfax/includes/local_config.php.backup
#mv /var/www/html/avantfax/includes/local_config.php /var/www/html/
avantfax/includes/local_config.php.backup2
#sed "s/'OCR_LANGUAGE', "eng"/'OCR_LANGUAGE', "spa"/g" /var/www/html/
avantfax/includes/local_config.php.backup2 > /var/www/html/avantfax/
includes/local_config.php
#rm -rf /var/www/html/avantfax/includes/local_config.php.backup2
cd /var/www/html/avantfax/tools
./ocr_import.php
echo
"********************************************************************************"
echo "*"
echo "*"
echo "*"
echo "* Now you can go to
https://yourserver/avantfax/admin and login
with:"
echo "* username: admin"
echo "* password: password"
echo "* and configure users for AVANTFAX"
echo "*"
echo "* Then go to
https://yourserver/avantfax/"
echo "* and login with one of the users you just created."
echo "*"
echo "* Good web faxing!!"
echo "*"
echo "*"
echo "*"
echo
"*******************************************************************************"
Suerte!!
Ramón Lozano
SOLID PC, S.L.
On 5 mar, 13:25, "Facundo Ameal" <
fam...@gmail.com> wrote:
> 2008/3/5
soli...@gmail.com <
soli...@gmail.com>: