#portinstall www/analog
とするが、どうも、confファイルなどが思うところに入らないので、
#make /usr/ports/www/analog
として、work ディレクトリを作成し、その中から必要なファイルを取り出すことにした。
% cd work/analog-6.0/ % cp -p anlgform.pl /usr/local/share/analog % cp -p anlgform.pl /usr/local/www/cgi-bin/ % mkdir /usr/local/www/data/analog/ % cp -p /usr/local/share/analog/lang/jpeform.html /usr/local/www/data/analog/ # cp -p /usr/local/www/apache22/data/analog/jpeform.html /usr/local/www/data/analog.html # cp -p /usr/local/www/data/analog.html /usr/local/www/data/analog.html.orig
% diff analog.html.orig analog.html
9c9 < <h1><!-- img src="/images/analogo.gif" alt="" --> Analog フォーム・インタフェース</h1> --- > <h1><img src="/images/analogo.gif" alt=""> Analog フォーム・インタフェース</h1> 17c17 < <!-- form action="/cgi-bin/anlgform.pl" method="POST" --> --- > <form action="/cgi-bin/anlgform.pl" method="POST"> 21c21 < <!-- input type=hidden name="IMAGEDIR" value="/images/" --> --- > <input type=hidden name="IMAGEDIR" value="/images/"> 24c24 < <!-- input type=hidden name="cg" value="/analog/other.cfg" --> --- > <!--input type=hidden name="cg" value="/analog/other.cfg"--> 27c27 < <!-- input type=hidden name="LOGFILE" value="/usr/local/apache/logs/access_log" --> --- > <!--input type=hidden name="LOGFILE" value="/var/log/httpd-access.log"--> 36,39c36,39 < <strong><font color=red>注意 : 以下の指示に従って環境を設定し終わるまで、 < このフォームは動作しないでしょう。例えば、ボタンさえ現れないかもしれません。 < 環境設定を終了した後、この文節を削除してください。<br> < </font></strong> ---
# cp -p /usr/local/www/cgi-bin/anlgform.pl /usr/local/www/cgi-bin/anlgform.pl.orig
% diff -urN anlgform.pl.orig anlgform.pl
--- anlgform.pl.orig 2004-12-19 22:51:22.000000000 +0900 +++ anlgform.pl 2008-10-11 16:10:52.000000000 +0900 @@ -18,8 +18,9 @@ # 1) uncomment (remove everything before $analog) and edit one of the next two # lines to give the location (full pathname) of the analog executable. -# Unix: $analog = '/usr/local/etc/httpd/analog-6.0/analog'; -# Windows: $analog = 'C:\program files\analog 6.0\analog.exe'; +#Unix: $analog = '/usr/local/etc/httpd/analog-6.0/analog'; +Unix: $analog = '/usr/local/bin/analog'; +#Windows: $analog = 'C:\program files\analog 6.0\analog.exe'; # 2) If you're on Unix, edit the first line in this file to give the location # of Perl (don't remove the #! though). # 3) You also need to edit anlgform.html if you want to use the form. @@ -28,7 +29,7 @@ @forbidden = qw(LOGFORMAT APACHELOGFORMAT DEFAULTLOGFORMAT APACHEDEFAULTLOGFORMAT HEADERFILE FOOTERFILE UNCOMPRESS OUTFILE CACHEOUTFILE LOCALCHARTDIR ERRFILE DNS CGI - SETTINGS PROGRESSFREQ LANGFILE DESCFILE); + SETTINGS PROGRESSFREQ LANGFILE DESCFILE CG CM); # Forbidden commands: sysadmin can add more (must be in upper case!) # Other commands you might consider adding, because they allow users to # specify which files to use for the analysis, are LOGFILE and DOMAINSFILE. @@ -95,8 +96,15 @@ # 3) PRINT ALL THE COMMANDS # Special cases: must come first -printargs('CG', 'CONFIGFILE') unless forbidden('CG'); -# both 'CG' and 'CONFIGFILE' must be allowed for this to happen. +$configfile = "/usr/local/www/data/analog/other.cfg"; +printargs('CM', 'CONFIGFILE') unless forbidden('CM'); +# again, both 'CM' and 'CONFIGFILE' must be allowed for this to happen. +open(CONFIG, $configfile); +while (<CONFIG>) +{ + print ANALOG $_; +} +close(CONFIG); print ANALOG "CGI ON\nDNS NONE\nWARNINGS FL\n"; printargs('WARNINGS'); printargs('LOGTIMEOFFSET');
% vi /usr/local/www/data/analog/other.cfg
LOGFORMAT COMBINED LOGFILE /var/log/httpd-access.log #(解析対象のログファイルを指定) DNSFILE /usr/local/www/cgi-bin/analog/dnscache.txt DNSLOCKFILE /usr/local/www/cgi-bin/analog/dnslock DNS WRITE OUTPUT HTML
% mkdir /usr/local/www/cgi-bin/analog
http://piano.smb.net/analog.html
http://piano.smb.net/~kuji/pukiwiki-1.4.7_notb_utf8/index.php?Analog
http://www.google.co.jp/search?hl=ja&q=analog+6.0%E3%80%80FreeBSD%E3%80%80analog.cfg&lr=
http://www.bugbearr.jp/?FreeBSD%2Fanalog
http://freebsd.sing.ne.jp/FreeBSD/15.html
2008-10-11 (土) 17:18:26