{"id":39,"date":"2006-12-04T11:12:19","date_gmt":"2006-12-04T03:12:19","guid":{"rendered":"http:\/\/140.123.23.69\/blog\/?p=39"},"modified":"2006-12-04T11:12:19","modified_gmt":"2006-12-04T03:12:19","slug":"freebsd61-%e5%ae%89%e8%a3%9d-awstats-%e7%b6%b2%e7%ab%99%e8%b3%87%e6%96%99%e5%88%86%e6%9e%90%e8%bb%9f%e9%ab%94","status":"publish","type":"post","link":"https:\/\/blog.smallken.site\/?p=39","title":{"rendered":"FreeBSD6.1 \u5b89\u88dd awstats &#8211; \u7db2\u7ad9\u8cc7\u6599\u5206\u6790\u8edf\u9ad4"},"content":{"rendered":"<p><img decoding=\"async\" src=\"http:\/\/blog.smallken.ink\/wp-content\/uploads\/2006\/12\/3.jpg\" \/><\/p>\n<p>\u5b98\u65b9\u7db2\u7ad9\uff1a<a href=\"http:\/\/awstats.sourceforge.net\/\">http:\/\/awstats.sourceforge.net\/<\/a><\/p>\n<table BORDER COLS=1 WIDTH=\"400\" BGCOLOR=\"#000000\" >\n<tr>\n<td><font color=\"#ffffff\"><br \/>\n\/\/ \u5230\u5b98\u65b9\u7db2\u7ad9\u4e0b\u8f09\u7a0b\u5f0f<br \/>\n# fetch <a href=\"http:\/\/prdownloads.sourceforge.net\/awstats\/awstats-6.5.tar.gz\">http:\/\/prdownloads.sourceforge.net\/awstats\/awstats-6.5.tar.gz<\/a><br \/>\n\/\/ \u89e3\u58d3\u7e2e\uff0c\u4e26\u4e14\u6307\u5b9a\u89e3\u5230 \/usr\/local \u76ee\u9304<br \/>\n# tar zxvf awstats-6.5.tar.gz -C \/usr\/local\/<br \/>\n# cd \/usr\/local\/awstats-6.5\/tools\/<br \/>\n\/\/ \u958b\u59cb\u57f7\u884c\u8a2d\u5b9a\u904e\u7a0b<br \/>\n# perl awstats_configure.pl<\/p>\n<p>\/usr\/local\/awstats-6.5<br \/>\nto standard directory:<br \/>\n\/usr\/local\/awstats<br \/>\nAnd then, run configure.pl from this location.<br \/>\nDo you want to continue setup from this NON standard directory [yN] ? y<br \/>\n\/\/ \u5b89\u88dd\u5230 \/usr\/local\/awstats-6.5 \u6c92\u554f\u984c\uff0c\u6240\u4ee5 y<\/p>\n<p>&#8212;&#8211;> Check for web server install<\/p>\n<p>Enter full config file path of your Web server.<br \/>\nExample: \/etc\/httpd\/httpd.conf<br \/>\nExample: \/usr\/local\/apache2\/conf\/httpd.conf<br \/>\nExample: c:Program filesapache groupapacheconfhttpd.conf<br \/>\nConfig file path (&#8216;none&#8217; to skip web server setup):<br \/>\n> \/usr\/local\/etc\/apache21\/httpd.conf<br \/>\n\/\/ \u9019\u88e1\u7684OS\u662fFreeBSD6.1\uff0c\u6240\u4ee5apache\u7684\u8a2d\u5b9a\u6a94\u4f4d\u7f6e\u5982\u4e0a<\/p>\n<p>&#8212;&#8211;> Need to create a new config file ?<br \/>\nDo you want me to build a new AWStats config\/profile<br \/>\nfile (required if first install) [y\/N] ? y<br \/>\n\/\/ \u8981\u81ea\u52d5\u7522\u751f\u8a2d\u5b9a\u6a94\uff0cy<\/p>\n<p>&#8212;&#8211;> Define config file name to create<br \/>\nWhat is the name of your web site or profile analysis ?<br \/>\nExample: <a href=\"http:\/\/www.mysite.com\/\">www.mysite.com<\/a><br \/>\nExample: demo<br \/>\nYour web site, virtual server or profile name:<br \/>\n> smallken<br \/>\n\/\/ \u96a8\u4fbf\u6253\u500b\u540d\u7a31\u7d66\u5b83<\/p>\n<p>&#8212;&#8211;> Define config file path<br \/>\nIn which directory do you plan to store your config file(s) ?<br \/>\nDefault: \/etc\/awstats<br \/>\nDirectory path to store config file(s) (Enter for default):<br \/>\n><br \/>\n\/\/ \u8a2d\u5b9a\u6a94\u76ee\u9304\u8981\u5b58\u5728 \/etc\/awstates \u6c92\u554f\u984c\uff0c\u6240\u4ee5\u76f4\u63a5\u6309 Enter \u7e7c\u7e8c<\/p>\n<p>&#8212;&#8211;> Create config file &#8216;\/etc\/awstats\/awstats.smallken.conf&#8217;<br \/>\n Config file \/etc\/awstats\/awstats.smallken.conf created.<\/p>\n<p>&#8212;&#8211;> Don&#8217;t forget to restart manually your web server<br \/>\n\/\/ \u6700\u5f8c\u5b83\u8ddf\u6211\u5011\u8aaa\u5df2\u7d93\u5efa\u7acb\u597d \/etc\/awstats\/awstats.smallken.conf \u8a2d\u5b9a\u6a94\u4e86\uff0c\u5fc5\u8981\u6642\u8981\u518d\u624b\u52d5\u4fee\u6539\u5b83<\/p>\n<p>&#8212;&#8211;> Add update process inside a scheduler<br \/>\nSorry, configure.pl does not support automatic add to cron yet.<br \/>\nYou can do it manually by adding the following command to your cron:<br \/>\n\/usr\/local\/awstats-6.5\/wwwroot\/cgi-bin\/awstats.pl -update -config=smallken<br \/>\nOr if you have several config files and prefer having only one command:<br \/>\n\/usr\/local\/awstats-6.5\/tools\/awstats_updateall.pl now<\/p>\n<p>A SIMPLE config file has been created: \/etc\/awstats\/awstats.smallken.conf<br \/>\nYou should have a look inside to check and change manually main parameters.<br \/>\nYou can then manually update your statistics for &#8216;smallken&#8217; with command:<br \/>\n> perl awstats.pl -update -config=smallken<br \/>\nYou can also read your statistics for &#8216;smallken&#8217; with URL:<br \/>\n> <a href=\"http:\/\/localhost\/awstats\/awstats.pl?config=smallken\">http:\/\/localhost\/awstats\/awstats.pl?config=smallken<\/a><\/p>\n<p>Press ENTER to finish&#8230;<\/p>\n<p><\/font><\/table>\n<p>\/\/ \u63a5\u4e0b\u4f86\u6211\u5011\u8981\u624b\u52d5\u53bb\u4fee\u6539 awstats.smallken.conf \u9019\u500b\u8a2d\u5b9a\u6a94<br \/>\n# vi \/etc\/awstats\/awstats.smallken.conf<br \/>\n\/\/ FreeBSD6.1\u9810\u8a2dapache\u7684log\u6a94\u4f4d\u7f6e<br \/>\nLogFile=&#8221;\/var\/log\/httpd-access.log&#8221;<br \/>\n\/\/ \u91dd\u5c0d www \u7684\u767b\u9304\u6a94\u5206\u6790<br \/>\nLogType=W<br \/>\n\/\/ \u600e\u9ebc\u8f38\u5165\u90fd\u53ef\u4ee5<br \/>\nSiteDomain=&#8221;smallken&#8221;<br \/>\n\/\/ \u8a2d\u5b9a\u6210\u4e2d\u6587\u4ecb\u9762<br \/>\nLang=&#8221;tw&#8221;<br \/>\n\/\/ \u5efa\u7acb\u7a0b\u5f0f\u8981\u7528\u7684\u76ee\u9304<br \/>\n# mkdir -p \/var\/lib\/awstats<br \/>\n# cd \/usr\/local\/awstats-6.5\/wwwroot\/cgi-bin\/<br \/>\n# chmod +x .\/*.pl<\/p>\n<p>\/\/ \u4fee\u6539 httpd.conf<br \/>\n# vi \/usr\/local\/etc\/apache21\/httpd.conf<br \/>\n\/\/ \u9019\u884c\u5728\u5f88\u5f8c\u9762\uff0c\u4e4b\u524d\u5b89\u88dd\u7a0b\u5f0f\u52a0\u5165\u7684\u5e7e\u884c\u4e2d\uff0c\u4fee\u6539\u9019\u4e00\u884c<br \/>\nAlias \/awstats\/ &#8220;\/usr\/local\/awstats-6.5\/wwwroot\/cgi-bin\/&#8221;<\/p>\n<p>\/\/ \u91cd\u65b0\u555f\u52d5 apache<br \/>\n# \/usr\/local\/etc\/rc.d\/apache21.sh restart<\/p>\n<p>\/\/ \u4fee\u6539\u6b0a\u9650<br \/>\n# cd \/usr\/local<br \/>\n# chmod -R 755 awstats-6.5\/<br \/>\n# chown -R root:wheel awstats-6.5\/<\/p>\n<p>\/\/ \u7522\u751f\u5831\u8868\uff0cindex.html\u5c31\u662f\u7d71\u8a08\u5831\u8868\u7db2\u9801<br \/>\n# cd \/usr\/local\/awstats-6.5\/wwwroot\/cgi-bin\/<br \/>\n# perl awstats.pl -config=smallken -update -output > index.html<\/p>\n<p>\/\/ <a href=\"http:\/\/localhost\/awstats\/\">http:\/\/localhost\/awstats\/<\/a>\uff0c\u5373\u53ef\u770b\u5230\u7d71\u8a08\u7db2\u9801<br \/>\n\/\/ \u6210\u529f\u4e4b\u5f8c\uff0c\u6211\u5011\u53ef\u4ee5\u52a0\u5165 cron<br \/>\n# cd \/usr\/local\/awstats-6.5\/wwwroot\/cgi-bin\/<br \/>\n# vi awstats.sh<br \/>\n\/\/ \u52a0\u5165\u4ee5\u4e0b\u5167\u5bb9<br \/>\n#!\/bin\/sh<br \/>\ncd \/usr\/local\/awstats-6.5\/wwwroot\/cgi-bin\/<br \/>\nperl awstats.pl -config=smallken -update -output > index.html<\/p>\n<p># vi \/etc\/crontab<br \/>\n\/\/ \u52a0\u5165\u4ee5\u4e0b\u9019\u884c\uff0c\u8a2d\u5b9a\u6bcf\u592918:00\u81ea\u52d5\u57f7\u884c\u7d71\u8a08\u5831\u8868<br \/>\n0 18 * * * root \/usr\/local\/awstats-6.5\/wwwroot\/cgi-bin\/awstats.sh<\/p>\n<p>Linux \u5b89\u88dd\u53ef\u4ee5\u53c3\u8003\u9ce5\u54e5\u7684\u7ad9<br \/>\n<a href=\"http:\/\/linux.vbird.org\/linux_server\/0360apache.php#other_pkg_awstats\">http:\/\/linux.vbird.org\/linux_server\/0360apache.php#other_pkg_awstats<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b98\u65b9\u7db2\u7ad9\uff1ahttp:\/\/awstats.sourceforge.net\/ \/\/ \u5230\u5b98\u65b9\u7db2\u7ad9\u4e0b\u8f09\u7a0b\u5f0f # fet&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-39","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/blog.smallken.site\/index.php?rest_route=\/wp\/v2\/posts\/39","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.smallken.site\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.smallken.site\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.smallken.site\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.smallken.site\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=39"}],"version-history":[{"count":0,"href":"https:\/\/blog.smallken.site\/index.php?rest_route=\/wp\/v2\/posts\/39\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.smallken.site\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=39"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.smallken.site\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=39"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.smallken.site\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=39"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}