(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.
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:
- HylaFAX 4.4, HylaFAX 6, or HylaFAX EE 3 & 4
- PHP 5
- PHP PEAR 5 including MDB2_driver_mysql, Mail and Mail_Mime
- PHP mbstring - for improved UTF-8 sorting support (optional)
- PHP MySQL 5
- MySQL server 4.1.12 or better (see Important Notes below)
- sendmail/postfix/exim/qmail or use an external SMTP server
- cups/lpr and psutils
You may already have some of the above packages installed with your working installation of HylaFAX.
** 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:
This is the default system language for AvantFAX. You can change it to any language you have installed in avantfax/includes/lang/
If you installed HylaFAX from RPM, it may be installed in /usr while a SOURCE installation will default to /usr/local. This means that if the program sendfax is in /usr/bin/sendfax, $HYLAFAX_PREFIX should be "/usr". The same thing goes for other source installations like ghostscript and ImageMagick.
- Take a look at the other options in case you need to change the defaults
- For working Outbox support for usernames of 15 characters in length, JobFmt in /etc/hylafax/hyla.conf should read:
JobFmt: "%-3j %3i %1a %15o %40M %-12.12e %5P %5D %7z %.25s"
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)
# 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.
# 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.
# pear install Mail Net_SMTP Mail_mime MDB2_driver_mysql
5- Make your AvantFAX database. At the prompt, enter your MySQL root password.
# 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.
# 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:
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.
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.
# 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.
The default Admin login username and password are:
Once you login, you will be required to change the password. Be sure to change your email address in the Admin Settings.
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.
Every fax that arrives through modem ttyS0 will be email in PDF format to firstname.lastname@example.org as well as listed in the AvantFAX Inbox.
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
This fax interface was developed on Fedora Core 4 using:
- PHP 5.0.4 with mime_content_type
- PHP PEAR 5.0.4
- PHP MySQL 5.0.4
- PHP PEAR Mail_mime
- MySQL 4.1.16
- Apache 2.0.54
- ghostscript 7.07
- ImageMagick 6.2.2
- HylaFAX 4.2.5
- libtiff 3.7.1
- netpbm 10.31
- libpng 1.2.8
- libungif 4.1.3
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:
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.