Install

(as of AvantFAX 3.3.1)

NEW INSTALL SCRIPT:

New in AvantFAX 3 is an installation script for RHEL5, CentOS 5, and FC6. It was developed to setup AvantFAX on base Linux installation. However, HylaFAX must first be installed and the modems must be configured.

At the moment, it's only been tested on CentOS 5 but the procedure is identical. A similar script has been created for SLES 10.

The rh-install.sh does the following:

  • Installation of all required packages via yum
  • Updates PHP PEAR libraries
  • Configures HylaFAX's JobFmt and faxmail for AvantFAX
  • Installs AvantFAX files
  • Configures Apache virtual hosting for AvantFAX
  • Disables SELinux for Apache, allowing you to leave SELinux enabled on your server
  • Creates the AvantFAX MySQL user and database
  • Symlinks the AvantFAX faxrcvd and notify scripts to HylaFAX's $SPOOL/bin
  • Replaces HylaFAX's faxcover with AvantFAX's faxcover
  • Configures sudo
  • Configures HylaFAX $SPOOL/etc/config and $SPOOL/etc/config.tty* (not symlinks) to use AvantFAX's custom scripts
  • Automatically adds any configured HylaFAX modems to AvantFAX's database
  • Sets up root's crontab for the AvantFAX housekeeping scripts

Review the rh-prefs.txt before running the rh-install.sh script. Only run the script once or risk adding duplicate configuration settings to sudoers, sendmail, and HylaFAX configuration files.


ATTENTION:

Have you chosen to implement a AvantFAX server but lack the necessary experience or time to install and configure it correctly? That's where our installation support can save the day. For one fixed rate we will remotely install a copy of AvantFAX and HylaFAX on your server, configure and test it to make sure everything is running properly. Find out more on our AvantFAX Support page.


You will need a working installation of the following:

You may already have some of the above packages installed with your working installation of HylaFAX.

Before Installation:

** NOTICE **

If your PHP5 interpretor uses path /usr/bin/php5 instead of /usr/bin/php, I advise you to make a symlink for /usr/bin/php OR update the path in avantfax/includes/faxrcvd.php, notify.php, remold.php, faxcover.php, and phb.php.

You must take a look at avantfax/includes/local_config.php to verify the settings for your system. If you only have local_config-example.php, you must rename it to local_config.php.

Settings of interest:

Installation:

If you feel your system is ready for installation, here are the steps:

1- Move the avantfax/ directory to it's installation location (ex: /var/www/avantfax)

Example:

# mv avantfax /var/www/
# chown -R apache.apache /var/www/avantfax
# chmod -R 0770 /var/www/avantfax/tmp /var/www/avantfax/faxes
# chown -R apache.uucp /var/www/avantfax/tmp /var/www/avantfax/faxes

2- Symlink AvantFAX's faxrcvd and notify scripts to your HylaFAX spool bin directory.

Example:

# ln -s /var/www/avantfax/includes/faxrcvd.php /var/spool/hylafax/bin/faxrcvd.php
# ln -s /var/www/avantfax/includes/dynconf.php /var/spool/hylafax/bin/dynconf.php
# ln -s /var/www/avantfax/includes/notify.php /var/spool/hylafax/bin/notify.php

3- Modify the modem config files for the devices you want to use with AvantFAX. You can add the following to the bottom of the config.devid file (ie: ttyS1 or boston03).

Example:

# vim /var/spool/hylafax/etc/config.ttyS1
#
## AvantFAX configuration
#
FaxrcvdCmd:     bin/faxrcvd.php
DynamicConfig:  bin/dynconf.php
UseJobTSI:      true
# vim /var/spool/hylafax/etc/config
#
## AvantFAX configuration
#
NotifyCmd:      bin/notify.php

4- Make sure PEAR Mail_mime is installed.

Example:

# pear install Mail Net_SMTP Mail_mime MDB2_driver_mysql

5- Make your AvantFAX database. At the prompt, enter your MySQL root password.

Example:

# mysql -uroot -p < create_user.sql
# mysql -uavantfax -pd58fe49 avantfax < create_tables.sql

6- Add two scripts to avantfax's crontab (/etc/cron.d/avantfax): one for creating a phonebook file for WHFC; the other for removing AvantFAX temporary files, automatically archiving faxes, and automatically deleting faxes from the Archive.

Example: /etc/cron.d/avantfax

# runs once an hour to update the phone book
0 * * * * /var/www/avantfax/includes/phb.php
# runs once a day to remove old files
0 0 * * * /var/www/avantfax/includes/avantfaxcron.php -t 2

More information about avantfaxcron.php can by found by executing:

# /var/www/avantfax/includes/avantfaxcron.php

7- Comment out "Defaults requiretty" and add an entry for Apache to add and delete fax users, and to halt and reboot the server via sudo.

Example:

# visudo
#Defaults requiretty
apache ALL = NOPASSWD: /sbin/reboot, /sbin/halt,
/usr/sbin/faxdeluser, /usr/sbin/faxadduser -u * -p * *

If apache is running as another user, use that user (ie: wwwrun or www).

** WARNING ** SELinux protection for Apache must be disabled.

Disable with:

# setsebool -P httpd_disable_trans 1
# service httpd restart

8- You can now log into the admin to create user accounts. Login to the admin interface via web browser and go to the admin/ directory.

Example: http://10.0.0.1/admin/

The default Admin login username and password are:

username: admin
password: password

Once you login, you will be required to change the password. Be sure to change your email address in the Admin Settings.

Post Installation:

Once you have installed AvantFAX, you may wish to import your already received faxes in your hylafax spool directory.

First, in the Admin interface, create all of the modems you plan to use with AvantFAX and their alises.

Example:

device: ttyS0
alias: Sales
contact: sales@companyname.com

Every fax that arrives through modem ttyS0 will be email in PDF format to sales@companyname.com as well as listed in the AvantFAX Inbox.

device: ttyS1
alias: Support
contact:

Every fax that arrives through modem ttyS1 will only be shown in the AvantFAX Inbox.

Now, you may use the following command by substituting ttyS0 with your modem device to import your already received faxes:

cd /var/spool/hylafax; for i in `ls recvq/*`; do bin/faxrcvd.php $i ttyS0; done

To import your sent faxes, try running this:

cd /var/spool/hylafax; for i in `ls doneq/q*`; do bin/notify.php $i done :30; done

Important notes:

This fax interface was developed on Fedora Core 4 using:

Apache 1 or an earlier version of Apache 2 will probably work because we have not configured anything special with Apache. We simply use the php5 module and have a VirtualHost configured for http://avantfax/.

Example we use for Apache 2:

NameVirtualHost *:80

< virtualhost>
DocumentRoot /var/www/avantfax
ServerName avantfax
< /virtualhost>

MySQL 4.1.11 was found to have a bug in it when using BOOL columns. Version 4.1.12 fixed this problem.

If your PHP is only configured as a CGI plug-in rather than an Apache module you may experience problems, as this configuration is not tested. safe_mode is also not tested and unlikely to work.



t38fax