(Answer) (Category) Faq-O-Matic Faq-O-Matic : (Category) Administrators' Guide : (Category) Install :
How To Run FOM on Windows
OK, I've managed to get FOM to work on Windows (with the help of Cygwin). Here's what I had to do:
1. Download and install the latest version of Cygwin from http://www.cygwin.com - in my case it was the packages with the 1.3.2 version of cygwin1.dll.
2. Extract the Perl version in the Cygwin /contrib directory (it's already compiled - I had some problems with compiling the source on my own). I'm using version 5.6.1-1.
3. Extract RCS from the /contrib directory (pre-built). I'm using version 5.7.1-2.
4. To make the email features work (mailing passwords/secrets), you'll need a mail transport agent - because I'm going to be using it on a LAN, I've already got a corporate mail server. This is exactly what sSMTP is for - sSMTP simply forwards mail to an existing mail transport agent. (I'm forwarding to an Exchange server, seems to work.) There's a pre-built version in Cygwin's /contrib directory.
5. Now you'll need Apache. I couldn't find a pre-built version, so I grabbed the source for version 1.3.20 from http://httpd.apache.org, unpacked it, and ran the commands "./configure", "make", and "make install" (without quotes). As long as Perl is installed before Apache, everything seems to work.
6. Download, unpack, and install FAQ-o-matic. I'm using version 2.711. The only changes I had to make from the default was to make the serveDir underneath the DocumentRoot (in my case, below the /htdocs directory). I tried having the serveDir underneath /cgi-bin, but kept getting odd errors ("Premature end of script headers", among others).
The only thing that I haven't figured out yet is how to set up the maintenance job using "crontab" - I don't think a Cygwinized version of crontab exists yet (although I admit I haven't run down every possibility yet). So, you have to run the maintenance job manually (a minor inconvenience in my opinion).
Otherwise, you should be able to configure and use FOM as normal.

Have fun!!
Glenn

Sorry, just a clarification to point #6: "serveDir" is the FOM variable that gets set when you do the initial FOM web-based configuration; "DocumentRoot" is an Apache configuration variable, set in the "httpd.conf" file.
Glenn
The binary distribution of Apache for cygwin environment is available from http://httpd.apache.org/dist/httpd/binaries/cygwin/
Note that you HAVE to use Perl built for Cygwin and not Activestate Perl.
aptes@lucent.com
A caveat to step 1 above is to make sure to select Default Text File Type of "Unix", not "DOS", when running Cygwin Setup. Either that, or make sure your fom-meta/ and serveDir directory trees are on Cygwin file systems mounted "binmode".
This is needed because the Faq-O-Matic (2.712, anyway) scripts expect text files they read and write to have newline-only line termination (a.k.a. Unix line termination, LF only).
Selecting "DOS" and having a filesystem mounted "textmode" causes text files on that filesystem to be treated by Cygwin stdio as having CRLF line termination (a.k.a. DOS line termination, CR-LF), and such files will thoroughly confuse FOM.
I was able to get 2.716 working for the most part on Windows 2000 and 
Windows XP by following the advice above and completing the steps below.

As before, the maintenance scripts don't run automatically though you
can do this in windows 2000 by creating a simple batch file and using
the "at" like functionality built into 2000.

Email also sometimes gets lost, still tracking this down.

Other than that it acts just like a linux or unix distribution.

  Steps:

  - Install ActiveState Perl (I used version 5.6.1)
  - Install cygwin (I used version 1.3.15)
  - Install Apache (I used version 1.3.37)
  - Install Faqomatic (I used version 2.716 and 2.711 for comparison)

  In a cygwin bash window:

  Go to directory where you untar'ed the Faqomatic files
  - perl Makefile.PL worked fine
  - make failed.  I had to instead run "make -n > make.sh" and edit the
    file slightly.  I then ran make.sh and ignored any warnings/errors
  - Go to the lib/FAQ directory and edit OMatic.pm.  The mySystem
    function should be renamed to something like mySystem2.
    Add the following code to the file:

    sub mySystem {
       my $cmd = shift;
       return system($cmd);
    }

    The orignal version of mySystem hangs on ActiveState perl, I didn't figure
    out why, just used the simple workaround above.

  - Go to the lib/FAQ/OMatic directory and edit Item.pm.
    Search for the line that starts out:

      $cmd = "$FAQ:OMatic::Config::RCSci    

    Put \" around the $itemPath and the $rcsFilePath variables
    This is because of the spaces in "Program Files" and "Apache Group"
    that you may have in your installation.

  Go to the directory where you untar'ed the Faqomatic files
  - make install will fail. Instead just copy lib/FAQ directory 
    into your perl site/lib directory.
  - modify fom script to point to your perl executable path (#!) and
    to make sure the "use" lines point to the location of FAQ directory
  - copy fom script to your apache cgi-bin directory

  Now once you get Apache configured to run cgi scripts, you should be
able to get to the install screen.  Unfortunately the values for RCSci,
mail, and crontab commands don't let you enter ":" or ".".  So, what
you have to do is do the best you can and then go in by hand to the
config file in your "fom-meta" directory and change these values with
your favorite editor.

  Only other hurdle left is email.  I chose to use ssmtp instead of
sendmail.  This required changing OMatic.pm to not add the -s $subj
when sending email.  I also found it useful to log the emails sent
to a file during testing.  Code for this is here:

   open(MAILLOG, ">>c:/temp/fomemail.log") || die "can't open log file";
   print MAILLOG "X-URL: $xurl\n\n";
   print MAILLOG $mesg;
   close(MAILLOG);

and this goes just below the close(MAILX); in OMatic.pm in the non-sendmail
section (around line 1385)

  Note that you need to get email working before trying to enable security
due to the secret emailed to you for verification.  If you can't get email
to work you can at least read the 'secrets' from the log file and continue.

  Care must be taken when redefining configuration parameters as
you will need to go back and tweak the values that require ":" or
"." in the paths to commands.

  Examples for my paths in fom-meta/config are:
    $RCSci='/cygwin/bin/ci';
    $RCSco='/cygwin/bin/co';
    $crontabCommand = '/cygwin/usr/sbin/crontab';
    $mailCommand = '/cygwin/usr/sbin/ssmtp';

  Note that I capitulated and chose not to use "c:" on the front of the
paths or to add ".exe" at the end.

  I've found this works for me and I can use Faqomatic on Windows.

  YMMV,
Hi, I *really* apprecaite what is written before, but, could someone post a step-by-step answer. I'm by no means a computer newbie. I've setup FOM on red-hat a couple of times. However, there are some steps for windows that are not clear to me. I know it's work, but can someone please do this....please? Thanks
[Append to This Answer]
Previous: (Answer) Virtual Hosts
Next: (Answer) How to migrate FOM to another machine
This document is: http://www.jonh.net/cgi-bin/faqomatic/fom?file=1315
[Search] [Appearance]
This is a Faq-O-Matic 2.718d.
Hosted by SourceForge Logo and jonh.net.