Fax2Serve
Installation Instructions
I'm going to To setup and install Fax2Serve you need to complete the
following steps:
- Install and configure the OS
- Setup hardware.
- Setup Mgetty+SendFax to receive faxes.
- Setup Mgetty+SendFax to send faxes (if needed).
- Install and configure Fax2Serve.
- Setup Samba to get at files from a Windows machine for
maintenance (optional).
Install and configure OS.
I have been installing Red Hat Linux. My current installations of Red
Hat running Fax2Serve are release 8 and 9. What I recommend for setting
up Fax2Serve is the following:
- Install as server.
- In setting up partitions, setup /opt and /var/www/html as
separate partitions. This way if you need to re-install the the OS, you
don't lose your software install and web archive.
- Select the following modules:
- Install X-Windows, KDE or Gnome (or both).
- Install Apache web server.
- Install Graphics conversion utilties.
- Install Windows file sharing (ie. Samba).
- Install tools and sources. (So you can compile drivers if
needed.)
- Setup a static IP address.
- Setup to start in graphical mode.
- Allow it to create a bootable repair disk if you want.
- Setup print queues using standard driver queues if you have CUPS printing.
If you don't have CUPS printing, modify the g3toprn file to use the alternate
printing method and make sure that all your printers support PCL.
- Install Sun's 1.4.x JVM from java.sun.com. After installing,
modify the .bash_profile in your user directory to set the JAVA_HOME
environment variable and put the JAVA executables in the path. Your
.bash_profile may look something like this:
- # .bash_profile
- # Get the aliases and functions
- ...
- # User specific environment and startup programs
- JAVA_HOME=/usr/java/j2sdk1.4.2
- PATH=$JAVA_HOME/jre/bin:$JAVA_HOME/bin:$PATH:$HOME/bin
- BASH_ENV=$HOME/.bashrc
- USERNAME="root"
- export USERNAME BASH_ENV PATH JAVA_HOME
- Log out and log back in to setup your environment, and then test
to see if Java is working as needed. After typing in the following
command you should see the following:
- java -version
- java version "1.4.2"
- Java(TM) 2 Runtime Environment, Standard Edition (build
1.4.2-b28)
- Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
Setup hardware.
If you are going to only use the two default serial ports off the
motherboard or standard serial IO card, all you need to do is plug in
your modems. If you use some other type of serial port controller card
such as a Digiboard or Comtrol RocketPort you will most likely need to
manually install drivers so that MGetty+SendFax can use them. The
example I'm giving is how I setup my 16-port Comtrol RocketPort board:
- Download the drivers off the vendor's web site. Comtrol's drivers
come in source code format which need to be compiled and then installed.
After doing a search for PCI cards, drivers, and Linux I searched
for the RocketPort/PCI driver and downloaded 1800024G.tgz from http://support.comtrol.com/download.asp
to my /opt/download/ directory.
- I decompressed the archive using gzip (ie. gzip -d 1800*).
- I un-tarred the file using tar (ie. tar -xvf 18000G.tar).
- I then changed into the /opt/download/comtrol/ directory and did
a listing.
- By all rights you should just type the make command and you would
be done. The only problem with this is that there are two lines in the
Makefile that need to be modified so that when "make" is run everything
will compile. Red Hat Linux stores the include files needed by make in a
different directory than what is configured in the "Makefile" file.
First, change to the /usr/src directory and you will see linux with some
numbers after it. This is basically the change you need to make in the
Makefile. Every place where you see /usr/src/linux/include/... change it
to /usr/src/linux-2.4.20-8/include/... (or whatever the number is).
- Run make clean (ie. make clean). If you get a command not found,
you didn't install the tools and sources as required. Either figure out
how to manually install them or re-install the OS and start over.
- Run make without any parameters to create the drivers.
- Install the drivers by running the setup.sh script which will
copy the drivers and setup Linux to load them automatically. (To run
setup.sh type ./setup.sh in the /opt/download/comtrol/ directory or type
out the full path /opt/download/comtrol/setup.sh from anywhere.)
- Restart the OS and you should see Comtrol RocketPort load and all
the device names enumerated (ie. ttyR0, ttyR1, etc.
Setup MGetty+SendFax for receiving faxes.MGetty+SendFax doesn't install by default. It may also be helpful to
install Linuxconf to ease configuration of MGetty+SendFax.
- Insert the distribution CD into your CD drive with the
MGetty+SendFax RPM on it. (With Red Hat 9, this is on the second CD-ROM.)
- Mount the cdrom (ie. mount /dev/cdrom).
- Change to the RPM directory on the CD-ROM. cd
\mnt\cdrom\RedHat\RPMS
- Check to see if the MGetty+SendFax files are in the directory by
using ls (ie. ls mget*).
- To install the MGetty+SendFax modules use the RPM command (ie.
rpm -ivh mget*).
If you want to use an easier method of setup, you can install Linuxconf
which gives a GUI interface to MGetty+SendFax. (Linuxconf used to come
with Red Hat in previous versions, but because of bugs in the network
configuration utilties it was dropped.)
- Go to the LinuxConf web site at: http://www.solucorp.qc.ca/linuxconf/.
- Select Download off the left-hand menu.
- Select your distribution, language and hit the "Submit Query"
button.
- From your preferred site, download all the modules into a
directory called /opt/download/linuxconf/.
- Change to the /opt/download/linuxconf/ directory and install
using the RPM command (ie. rpm -ivh *).
- Either start Linuxconf from a telnet session (ie. linuxconf), or
create a desktop icon labeled LinuxConf that calls the program linuxconf.
- The first time Linuxconf runs it gathers all sorts of information
and I just click on it until the program shows up on the screen.
- To configure Linuxconf to manage MGetty+SendFax, select the
"Control" tab and expand the "Linuxconf management" branch. Under the
"Linuxconf management" branch you should see a sub-heading called
"Modules."
- When "Modules" is selected you should see a list of modules to
the right that Linuxconf can manage. Scroll down until you see
"mgettyconf" and check it. You will also see "modemconf" listed, but we
won't be needing it.
- Exit from the Linuxconf program and restart it.
- When Linuxconf is restarted, select the "Config" tab, expand the
"Networking" branch, under "Networking" expand the "Server tasks"
branch, and then under the "Server tasks" branch you will se a new
sub-heading named "serial port setup (mgetty)" which is where we can
configure MGetty+SendFax.
To configure MGetty+SendFax using Linuxconf follow these steps:
- Select the sub-heading "Serial port defaults" under the "Serial
port setup (mgetty)" heading. The only thing I normally change here is
the baud rate. I leave everything else to defaults (ie. blank).
- Select the sub-heading "Fax settings" under "Serial port setup
(mgetty)" heading. The only thing I ever change here is the Fax id.
Change it to your company name or fax number.
- Select the sub-heading "Serial ports" under "Serial port setup
(mgetty)" heading. This is where we get busy setting up all the serial
ports and modems that will be attached to this server. Hit the "Add"
button for each serial port to configure.
- In the serial port configuration setup following:
- Setup the correct device name for your serial port. If you are
using standard serial ports (ie. COM1 or COM2), use /dev/ttyS0 or
/dev/ttyS1. If you are using a Comtrol RocketPort your ports would
normally start at /dev/ttyR0 and go until the last port on your board
which if you had a 16 port device would be /dev/ttyR15.
- I always like to setup the "Baud rate" at 115200.
- On newer modems I setup the modem as cls2.0 in the "Modem type."
- The only other settings I mess with is under the "Runlevels"
tab and I check levels 3 and 5 as when I want the modems to initialize.
- Accept the settings and repeat until you have installed all the
modems you are going to have on this server.
- You are basically done with MGetty+SendFax. Just restart Linux
and all your modems should initialize and be ready to start receiving
faxes.
To configure MGetty+SendFax manually you need to edit two files;
initttab in the /etc/ directory, and mgetty.conf in the
/etc/mgetty+sendfax/ directory.
- Add the modem init commands to the inittab file by adding the
following lines for a COM1, COM2, and the fourth port on a Comtrol
RocketPort (examples). Don't mess with the other lines ...
- RO:35:respawn:/sbin/mgetty /dev/ttyS0
- R1:35:respawn:/sbin/mgetty /dev/ttyS1
- R2:35:respawn:/sbin/mgetty /dev/ttyR3
- Here is an example mgetty.conf file for the same three modems and
a fax id of "Fax Sender". I put in a modem type lf cls2.0 (which all new
modems should support), which you can leave out and the software will
auto-detect the modem as Linux boots up.
- debug 4
- fax-id Fax_Sender
- speed 115200
- port /dev/ttyR0
- speed 115200
- modem-type cls2.0
- port /dev/ttyR11
- speed 115200
- modem-type cls2.0
Reboot your server and test MGetty+SendFax to see if it will receive a
fax. Once a fax is received it should appear as a file in the
/var/spool/fax/incoming/ directory and should look something like:
ffefb621711-800-975-4401.01
Setup MGetty+SendFax for sending faxes.
- Setup faxrunq to process outgoing faxes.
- Modify the /etc/inittab file to run faxrunq regularly as follows:
- # Run every minute ...
- * * * * * root faxrunq
- Modify the /etc/mgetty+sendfax/sendfax.config file as needed.
- Modify the fax-id parameter to the name you want other fax machines to
see your machine as.
- Modify the fax-devices parameter to which modems you want to send faxes
on.
- Modify the max-tries parameter as needed.
- Modify the /etc/mgetty+sendfax/mgetty.config file as needed.
- Modify the fax-id parameter to the name you want other fax machines to
see your machine as.
- Restart Linux to make effective your changes.
- Fax2Serve keeps a log file called Fax2Send.log in the Fax2Serve program
directory. Each fax sent is logged and can be viewed by any program capable of
viewing a Unicode (Big Endian) text file. At the command prompt in Linux you
can simply cat the file to the console. If you are accessing it from Windows
you will need an application that can handle Unicode.
Install and configure Fax2Serve.
A - Install using Install Anywhere
executable:
- Verify Java environment (if you are going to download the Fax2Serve
without the Java VM).
- Verify faxes can be received.
- Download f2s20031024LinuxNoVM.bin (or f2s20031024LinuxVM.bin if you didn't
configure Java manually) from http://sourceforge.net/projects/fax2serve/
into the /opt/ directory.
- Use the chmod command to make the bin file executable file (ie. chmod +755
fax2serve*).
- Run the downloaded installer executable
- Select to have the application installed to the /opt/fax2serve/ directory.
- Select to have the startup script installed to the /opt/ directory.
- Run the fax2serve script file which will setup the Java class
path and start the application. If you are running Red Hat Linux 8 or 9,
and installed, the default paths should work. If not you will need to
change the program settings which can be found under the File pull-down
menu.
- Setup the ports as needed.
- Send a test fax and verify that Fax2Serve routes the fax as
expected.
B - Install using platform independent archive:
- Verify Java environment.
- Verify faxes can be received.
- Download f2s20031024.tgz from http://sourceforge.net/projects/fax2serve/
into the /opt/fax2serve directory.
- Decompress using gzip (ie. gzip -d f2s2003*).
- Un-tar the archive using tar (ie. tar -xvf
f2s20031024.tar).
- Run the fax2serve script file which will setup the Java class
path and start the application. If you are running Red Hat Linux 8 or 9,
and installed, the default paths should work. If not you will need to
change the program settings which can be found under the File pull-down
menu.
- Setup the ports as needed.
- Send a test fax and verify that Fax2Serve routes the fax as
expected.
Setup Samba to get at files from a Windows machine for maintenance
(optional).
- Create Linux users that will match usernames that will log into
your Linux box from Windows machines.
- Run the services tool to setup Samba to auto start and start the
SMB daemon.
- Modify the smb.conf file (usually in the /etc/samba/ directory)
as follows for simple SMB connections from Windows machines. I'm only
showing what I have modified to make this work.
- # Change this to match your Windows workgroup
- workgroup = foowrkgrp
- # Just a descriptive name of your server that shows up in
network browsing.
- server string = Foo Enterprises Fax Server
- # Change this to match sub-nets on your network that you want
to allow access to your server
- hosts allow = 10.80.8. 10.80.9. 10.80.10. 10.80.11. 127.
- # If you have a domain server add this to make Samba use the
user's passwords
- # from the domain server instead of manually maintaining the
passwords on this server.
- password server = 10.80.9.20
- # I always disable the home directory sharing on this type of
server
- #[homes]
- # comment = Home Directories
- # browseable = no
- # writable = yes
- # valid users = %S
- # create mode =0664
- # directory mode = 0775
- # I add the following shares and give specific users rights to
those directories
- # only as needed.
- [fax]
- comment = incoming fax directory
- path = /var/spool/fax
- valid users = jimbob jimmydean
- public = no
- writable = yes
- printable = no
- create mask = 0775
- [opt]
- comment = program and download directory
- path = /opt
- valid users = jimbob jimmydean
- public = no
- writable = yes
- printable = no
- create mask = 0775
- [www]
- comment = web html files
- path = /var/www/html
- valid users = jimbob jimmydean
- public = no
- writable = yes
- printable = no
- create mask = 0775
- Restart the SMB services after updating your smb.conf file as
needed by typing:
- Create Samba users using the smbpasswd program as follows for
each user. In keeping with the above example I show jimbob as being
created:
- smbpasswd -a jimbob
- New SMB password:
- Retype new SMB password:
- Added user jimbob
- From Windows you can now map to your server. If you named your
server fax2serve, you could map to the "opt" share by using the Windows
explorer or by using the net command at the MS-DOS or command prompt:
- net use f: \\fax2serve\opt
- I setup this example to be simple and fairly secure. There are
many options to Samba where you can custimize Samba to your particular
needs, so have fun!