Installing Fax Server

               I have been tasked to install a fax server, although we have a fax server before and it was installed by one of the IT officer who had resigned already. At first its very hard for me to install it since I am skeptical if I can do it, and it was a challenge to me. I have been into a lot of trial and error on configuration until I make it at last. I hope that this configuration may help you install your own fax server. I am very thankful for Hylafax, AvantFax and Postfix for giving me ease of managing a fax server.

What you need?

Hylafax + Avantfax + Postfix
Modem US Robotics Fax Modem (Any modem you can use)

Linux OS – Fedora 15

1. Install Fedora 15

You may disable selinux if you are having problems on restrictions of file.

2. Configure Modem

A. Connect modem to serial port

B. Check modem by typing to terminal

dmesg | grep tty

This shows that you modem is automatically set to use ttyS0.

C. Now create symbolic link to the /dev/modem device.

ln -sf /dev/ttyS0 /dev/modem

D. Set the serial

setserial /dev/ttyS0 irq 4 port 0x3f8 uart 16550

E. Test the modem using minicom command

a. yum install minicom

b. type minicom, you should see like (e.g. ATZ then OK).

3. Install Hylafax

A. Download latest hylafax through hylafax website or command:


B. update fedora first through yum

yum -y update

C. Install necessary prerequisits

yum -y gcc-c++ libtiff libtiff-tools ghostscript ghostscript-font sharutils zlib zlib-devel awk

D. Install hylafax

./configure        or

./configure \

       --with-DIR_BIN=/usr/bin \
       --with-DIR_SBIN=/usr/sbin \
       --with-DIR_LIB=/usr/lib \
       --with-DIR_LIBEXEC=/usr/sbin \
       --with-DIR_LIBDATA=/etc/hylafax \
       --with-DIR_LOCKS=/var/lock \
       --with-LIBDIR=/usr/lib \
       --with-TIFFBIN=/usr/bin \
       --with-DIR_MAN=/usr/man \
       --with-PATH_GSRIP=/usr/bin/gs \
       --with-DBLIBINC=/usr/include \
       --with-LIBTIFF="-ltiff -ljpeg -lz" \
       --with-DIR_SPOOL=/var/spool/hylafax \
       --with-AFM=no \
       --with-AWK=/usr/bin/gawk \
       --with-PATH_VGETTY=/sbin/vgetty \
       --with-PATH_GETTY=/sbin/mgetty \
       --with-PAGESIZE=A4 \
       --with-PATH_DPSRIP=/var/spool/hylafax/bin/ps2fax \
       --with-PATH_IMPRIP="" \
       --with-SYSVINIT=/etc/init.d/hylafax \


make install

F. Run faxsetup and faxaddmodem

G. Add faxmodem to inittab

vi /etc/inittab

m0:2345:respawn:/usr/local/sbin/faxgetty ttyS0

H. Start hylafax

/usr/local/sbin/hylafax start

4. Install Avantfax

A. Download avantfax at

B. Install necessary prerequisits

yum -y install httpd php ImageMagick mysql mysql-server libtiff libungif ghostscript

sudo postfix netpbm-progs php-pear

C. Extract avantfax to desired directories

[root@faxserver admin]#

tar -xvzf avantfax-3.3.3.tgz

D. Move the avantfax directory to /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

E. Modify the modem config files

vim /var/spool/hylafax/etc/config.ttyS0



	## AvantFAX configuration
	FaxrcvdCmd:     bin/faxrcvd.php
	DynamicConfig:  bin/dynconf.php
	UseJobTSI:      true

F. Edit config

vim /var/spool/hylafax/etc/config



	## AvantFAX configuration
	NotifyCmd:      bin/notify.php

G. Install PEAR Mail_mime

pear install Mail Net_SMTP Mail_mime MDB2_driver_mysql

H. Create User for avantfax for MySQL

# mysql -uroot -p < create_user.sql

     # mysql -uavantfax -pd58fe49 avantfax < create_tables.sql

I. Create Cronjob

crontab -e

# 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

J. Edit /etc/sudo

Comment out

		# visudo
		#Defaults    requiretty


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

K. Create file on /etc/httpd/conf.d named

	   vim avantfax.conf
		NameVirtualHost *:80
		<VirtualHost *:80>
        	DocumentRoot /var/www/avantfax
        	ServerName avantfax

L. Restart httpd

service httpd restart

M. Enter http:// your ip address /admin/

username: admin
password: password

N. Create modem

Click Menu and Select Modems

You can add as many as you want as long as you have other device modem installed

device: ttyS1
alias: Support

device: ttyS2
alias: MIS

One you have completed it and installed it properly your FaxServer is ready for production.


3 thoughts on “Installing Fax Server

  1. A while ago i cannot login to avantfax page, i change password on Mysql database of avantfax but seems it doesn’t work, I try faxadduser and still not working, until finally i just reset the avantfax database. Well you can try the steps below:

    1. Drop table


    2. locate your avantfax installer

    a. mysql -uroot -p < create_user.sql

    b. mysql -uavantfax -pd58fe49 avantfax < create_tables.sql

    3. Restart

    service httpd restart
    service hylafax restart

    4. Do steps M to N above.

    5. Reload the fax

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

Mag-iwan ng Tugon

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Baguhin )

Twitter picture

You are commenting using your Twitter account. Log Out / Baguhin )

Facebook photo

You are commenting using your Facebook account. Log Out / Baguhin )

Google+ photo

You are commenting using your Google+ account. Log Out / Baguhin )

Connecting to %s