The FaqMan code is pure Perl, and as such it is pretty easy to move and install. There are, however, some environmental issues to note.
FaqMan stores it's data in a PostgreSQL database. The table structure is described in the Database Structure portion of this code documentation.
The information that controls the database connections which FaqMan makes is stored at the top of the faqman.pm file. This information needs to be adjusted if FaqMan moves. The DBI Perl module needs to be installed on the system.
FaqMan does some spell checking on new and modified Faqs which is supported by two pieces of outside code:
The spell program is a non-interactive Unix program which simply takes a document/file/pipe and prints to stdout a list of words it feels are misspelled. Other spelling checkers often work interactively which is not desired. The common Unix program "ispell" conatains a flag which allows "spell" emulation.
IPC::Open2 Perl module. This module is required to open a "double pipe" to the spell program, allowing input to be sent and stdout to be captured.
The "updatecommon" program runs an rsync command to bring the remote common directory up to date. It has several special requirements:
The FaqMan code uses the cron daemon to automate three functions:
the current crontab looks like this:
#min hour dom moy dow(0=sun) command # Twice a monthy out-of-date reminder 0 12 10 * * cd /qna/httpd/htdocs/faqs; ./reminder; 0 12 25 * * cd /qna/httpd/htdocs/faqs; ./reminder; # Nightly Common Directory update 0 1 * * * cd /qna/httpd/htdocs/faqs; ./updater; # weekly faq log rotater 30 1 * * 0 cd /tmp/faqs; rm faq.log; touch faq.log; chmod o+w faq.log;
FaqMan currently writes some text logs to /tmp/faqs/faq.log. This location should be changed or made to roll as desired.