{"id":198,"date":"2008-04-17T17:53:49","date_gmt":"2008-04-17T09:53:49","guid":{"rendered":"http:\/\/www.84tt.cn\/web\/?p=198"},"modified":"2008-04-19T11:17:00","modified_gmt":"2008-04-19T03:17:00","slug":"%e5%9c%a8dreamhost%e4%b8%bb%e6%9c%ba%e4%b8%8a%e9%83%a8%e7%bd%b2awstats%e7%bb%9f%e8%ae%a1%e7%b3%bb%e7%bb%9f","status":"publish","type":"post","link":"https:\/\/www.84tt.com\/web\/?p=198","title":{"rendered":"\u5728dreamhost\u4e3b\u673a\u4e0a\u90e8\u7f72AWstats\u7edf\u8ba1\u7cfb\u7edf"},"content":{"rendered":"<p>\u56fd\u5916\u865a\u62df\u4e3b\u673a\u4e00\u822c\u90fd\u76f4\u63a5\u5728\u7ba1\u7406\u754c\u9762\u96c6\u6210\u4e86\u57fa\u4e8e\u670d\u52a1\u5668\u65e5\u5fd7\u5206\u6790\u7684\u6d41\u91cf\u7edf\u8ba1\u7cfb\u7edf\uff0c\u5e38\u89c1\u7684\u6709<a href=\"http:\/\/www.mrunix.net\/webalizer\/\">Webalizer<\/a>\u3001<a href=\"http:\/\/awstats.sourceforge.net\/\">AWStats<\/a>\u548c<a href=\"http:\/\/www.analog.com\/\">Analog<\/a>\u4e09\u7c7b\u3002\u4e09\u8005\u672c\u8eab\u5404\u6709\u7279\u8272\uff0c<a href=\"http:\/\/www.bluehost.com\">bluehost<\/a>\u4e3b\u673a\u540c\u65f6\u96c6\u6210\u4e86Webalizer\u548cAWStats\uff0c\u4f46\u6211\u76ee\u524d\u4f7f\u7528\u7684<a href=\"http:\/\/www.dreamhost.com\">dreamhost<\/a>\u53ea\u76f4\u63a5\u63d0\u4f9b\u4e86Analog\uff0c\u867d\u8bf4\u529f\u80fd\u591f\u7528\uff0c\u4f46\u672c\u7740\u597d\u5947\u5fc3\u7406\uff0c\u4f9d\u7136\u5b89\u88c5\u4e86AWStats\u3002\u5f53\u7136\uff0c\u5982\u679c\u53ea\u662f\u4e00\u822c\u7684\u68c0\u6d4b\u7f51\u7ad9\u8bbf\u95ee\u7edf\u8ba1\uff0c\u73b0\u6709\u7684\u51e0\u4e2a<a href=\"http:\/\/www.84tt.com\/web\/2007\/10\/188.html\">\u7b2c\u4e09\u65b9\u8bbf\u95ee\u7edf\u8ba1\u670d\u52a1\u7ad9\u70b9<\/a>\u90fd\u4e0d\u9519\u3002<\/p>\n<p>\u6ce8\uff1a<br \/>\n1\u3001\u9700\u8981\u5f53\u524ddreamhost\u7528\u6237\u542f\u7528shell\uff1b<br \/>\n2\u3001shell\u7684\u5e38\u89c1\u547d\u4ee4\u7528\u6cd5\uff0c\u53ef\u4ee5<a href=\"http:\/\/www.84tt.com\/web\/2008\/02\/190.html\">\u53c2\u8003\u8fd9\u91cc<\/a>\uff1b<br \/>\n3\u3001\u6587\u4e2d\u6240\u5199yourusername\u8bf7\u66ff\u6362\u4e3a\u5728dreamhost\u4e2d\u7684shell\u5e10\u53f7\uff1bexample.com\u8bf7\u66ff\u6362\u4e3a\u9700\u8981\u7edf\u8ba1\u7684\u7ad9\u70b9\u57df\u540d\u3002<\/p>\n<p><strong>1\u3001\u4e0b\u8f7d<\/strong><br \/>\n\u8fdb\u5165\u5f53\u524d\u6839\u76ee\u5f55\uff1a<br \/>\ncd ~\/<\/p>\n<p>\u4e0b\u8f7dAWStats\uff0c<a href=\"http:\/\/awstats.sourceforge.net\/\">\u70b9\u51fb\u8fd9\u91cc<\/a>\u83b7\u53d6\u6700\u65b0\u7248\uff1a<br \/>\nwget http:\/\/awstats.sourceforge.net\/files\/awstats-6.7.tar.gz<\/p>\n<p>\u89e3\u538b\u7f29\uff1a<br \/>\ntar xfzv awstats-6.7.tar.gz<\/p>\n<p>\u91cd\u547d\u540dawstats\u76ee\u5f55\uff0c\u5e76\u8fdb\u5165awstats\u76ee\u5f55\uff1a<br \/>\nmv awstats-6.7 awstats<br \/>\ncd awstats<\/p>\n<p>\u68c0\u67e5\u5f53\u524d\u76ee\u5f55\u662f\u5426\u4e3a\uff1a<br \/>\n\/home\/yourusername\/awstats<\/p>\n<p><strong>2\u3001\u5b89\u88c5<\/strong><\/p>\n<p>2\u3001\u6539\u53d8\u6587\u4ef6\u76ee\u5f55<\/p>\n<p>\u521b\u5efadata\u76ee\u5f55\uff0c\u5e76\u6539\u53d8\u5176\u6743\u9650\uff1a<br \/>\ncd ~\/awstats<br \/>\nmkdir data<br \/>\nchmod 755 data<\/p>\n<p>\u79fb\u52a8\/home\/yourusername\/awstats\/wwwroot\/cgi-bin\/ \u76ee\u5f55\u81f3 \/home\/yourusername\/awstats\/ \uff1a<br \/>\nmv ~\/awstats\/wwwroot\/cgi-bin ~\/awstats<\/p>\n<p>3\u3001\u8bbe\u7f6e\u7f51\u7ad9\u57df\u540d<\/p>\n<p>\u5728\u9700\u8981\u7edf\u8ba1\u7684\u57df\u540d\u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2a\u65b0\u76ee\u5f55\uff1a<br \/>\nmkdir ~\/domainname.com\/statistics<\/p>\n<p>\u590d\u5236\u4ee5\u4e0bicon\u3001css\u3001js\u4e09\u7c7b\u6587\u4ef6\u81f3\u5f53\u524d\u57df\u540d\u7684\u7edf\u8ba1\u8f93\u51fa\u76ee\u5f55\u4e0b\uff1a<br \/>\ncp -r ~\/awstats\/wwwroot\/{icon,css,js} ~\/domainname.com\/statistics<\/p>\n<p>\u6ce8\u610f\uff1a\u8be5\u7edf\u8ba1\u7ed3\u679c\u8f93\u51fa\u76ee\u5f55\u4e0d\u80fd\u547d\u540d\u4e3a\u201csatas\u201d\uff0c\u56e0\u4e3adreamhost\u5df2\u7ecf\u5c06\u201cdomainname.com\/stats\u201d\u4f5c\u4e3aAnalog\u7edf\u8ba1\u7ed3\u679c\u7684\u8f93\u51fa\u76ee\u5f55\u3002<\/p>\n<p>4\u3001\u914d\u7f6e<\/p>\n<p>\u5728awstats\/cgi-bin\/ \u76ee\u5f55\u4e2d\uff0c\u590d\u5236awstats.model.conf\u5e76\u91cd\u547d\u540d\u4e3aawstats.domainname.com.conf\uff1a<br \/>\ncp ~\/awstats\/cgi-bin\/awstats.model.conf ~\/awstats\/cgi-bin\/awstats.domainname.com.conf<\/p>\n<p>\u4f7f\u7528vim\u6253\u5f00\u5e76\u4e14\u7f16\u8f91\u6b64\u6587\u4ef6\uff1a<br \/>\nvi ~\/awstats\/cgi-bin\/awstats.domainname.com.conf<\/p>\n<p>\u4fee\u6539\u8be5\u6587\u4ef6\u4e2d\u7684\u4ee5\u4e0b\u5185\u5bb9\uff1a<br \/>\n   \uff081\uff09\u4fee\u6539yourusername\u3001example.com\u4e3a\u81ea\u5df1\u7684\u5b9e\u9645\u4fe1\u606f\uff1b<br \/>\n   \uff082\uff09\u5982\u679c\u4e0d\u719f\u6089vi\u547d\u4ee4\u7684\u4f7f\u7528\uff0c\u53ef\u4ee5\u901a\u8fc7FTP\u8f6f\u4ef6\u76f4\u63a5\u4e0b\u8f7d\u8be5\u6587\u4ef6\uff0c\u7f16\u8f91\u540e\u91cd\u65b0\u4e0a\u4f20\u8986\u76d6\u3002<\/p>\n<p>LogFile=&#8221;\/home\/yourusername\/awstats\/tools\/logresolvemerge.pl<br \/>\n\/home\/yourusername\/logs\/domainname.com\/http\/access.log*|&#8221;<br \/>\nLogFormat=&#8221;%host %other %other %time1 %methodurl %code %bytesd %refererquot %uaquot&#8221;<br \/>\nSiteDomain=&#8221;domainname.com&#8221;<br \/>\nHostAliases=&#8221;www.domainname.com&#8221;<br \/>\nDNSLookup=0<br \/>\nDirData=&#8221;\/home\/yourusername\/awstats\/data\/&#8221;<br \/>\nDirIcons=&#8221;icon&#8221;<br \/>\nSaveDatabaseFilesWithPermissionsForEveryone=0<br \/>\nDefaultFile=&#8221;index.php index.html&#8221;<\/p>\n<p>5\u3001\u68c0\u67e5AWStats<\/p>\n<p>\u786e\u8ba4\u6240\u6709*.pl\u6587\u4ef6\u5747\u4e3a755\u6743\u9650\uff0c\u7b2c\u4e00\u884c\u5c5e\u6027\u8f93\u51fa\u5e94\u5747\u4e3a\uff1a -rwxr-xr-x\uff1a<br \/>\nls -o<\/p>\n<p>\u5982\u679c\u6709\u90e8\u5206\u6587\u4ef6\u4e0d\u662f755\u6743\u9650\uff0c\u8bf7\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<br \/>\nfind . -name &#8216;*.pl&#8217; | xargs chmod 755<\/p>\n<p>\u7136\u540e\u518d\u6b21\u8fd0\u884c\uff0c\u518d\u6b21\u68c0\u67e5\u6587\u4ef6\u6743\u9650\u662f\u5426\u6b63\u786e\uff1a<br \/>\nls -o<\/p>\n<p>\u68c0\u67e5\u6240\u6709\u6587\u4ef6\u548c\u914d\u7f6e\u662f\u5426\u5747\u5df2\u6b63\u5e38\u8fd0\u884c\uff1a<\/p>\n<blockquote><p>\nperl \/home\/yourusername\/awstats\/tools\/awstats_buildstaticpages.pl -config=domainname.com -update \\<br \/>\n-awstatsprog=\/home\/yourusername\/awstats\/cgi-bin\/awstats.pl -dir=\/home\/yourusername\/domainname.com\/statistics\/\n<\/p><\/blockquote>\n<p>    \u4ee5\u4e0a\u662f\u4e24\u6761\u547d\u4ee4\uff0c\u5982\u679c\u5728\u4e00\u884c\u4e2d\u8f93\u5165\uff0c\u8bf7\u53bb\u9664\u53cd\u659c\u6760\uff08\\\uff09\u3002<\/p>\n<p>\u5728\u6d4f\u89c8\u5668\u4e2d\u68c0\u67e5\u8f93\u51fa\u76ee\u5f55\u662f\u5426\u6b63\u5e38(\/statistics\/) \uff0c\u6d4f\u89c8awstats.domainname.com.html\u6587\u4ef6\uff0c\u5982\u679c\u4e00\u5207\u6b63\u5e38\uff0c\u90a3\u4e48\u5c31\u6210\u529f\u4e86\u3002\u63a5\u4e0b\u6765\uff0c\u8bbe\u7f6e\u8ba1\u5212\u4efb\u52a1\u4ee5\u4fbf\u6bcf\u5929\u81ea\u52a8\u5206\u6790\u5e76\u8f93\u51fa\u62a5\u8868\u3002<\/p>\n<p>6\u3001\u8ba1\u5212\u4efb\u52a1\u811a\u672c<\/p>\n<p>\u8fd9\u9879\u53ef\u4ee5\u5728dreamhost\u540e\u53f0\u76f4\u63a5\u6dfb\u52a0\u5e76\u8bbe\u7f6e\uff0c\u8bf7\u53c2\u8003<a href=\"http:\/\/wiki.dreamhost.com\/Crontab\">\u8fd9\u91cc<\/a>\u3002<\/p>\n<p>\u5230\u6b64\uff0c\u57fa\u672c\u5df2\u7ecf\u8bbe\u7f6e\u6210\u529f\u3002<strong>\u63a5\u4e0b\u6765\u9700\u8981\u8ba9AWstats\u8fd0\u884c\u5f97\u518d\u5b8c\u5584\u4e00\u4e9b\uff1a<\/strong><\/p>\n<p>1\u3001\u914d\u7f6e.htaccess \u6587\u4ef6\u5728\u62a5\u8868\u8f93\u51fa\u76ee\u5f55 (domainname.com\/statistics\/) \uff0c\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9\uff1a<br \/>\nDirectoryIndex awstats.example.com.html<\/p>\n<p>\u8fd9\u6837\u5c06\u4f1a\u4fee\u6539awstats.example.com.html\u6587\u4ef6\u4e3a&#8221;www.example.com\/statistics\/&#8221;\u76ee\u5f55\u7684\u9ed8\u8ba4\u9996\u9875\u6587\u4ef6\u3002<\/p>\n<p>2\u3001\u7ed9\u62a5\u8868\u8f93\u51fa\u76ee\u5f55\u6dfb\u52a0\u4e00\u4e2a\u8bbf\u95ee\u5bc6\u7801\uff1a<br \/>\n\u5728.htaccess\u6587\u4ef6\u589e\u52a0\u4ee5\u4e0b\u5185\u5bb9\uff1a<br \/>\nAuthType Basic<br \/>\nAuthUserFile \/home\/USERNAME\/www.example.com\/statistics\/.htpasswd<br \/>\nAuthName &#8220;My Awstats Report&#8221;<br \/>\nrequire valid-user<\/p>\n<p>\u66ff\u6362USERNAME\u4e3a\u81ea\u5df1\u7684DreamHost\u5f53\u524d\u7528\u6237\u540d\u3002<\/p>\n<p>\u63a5\u4e0b\u6765\u9700\u8981\u65b0\u589e\u4e00\u4e2a\u7528\u6237\u5728.htpasswd\u5bc6\u7801\u6587\u4ef6\u4e2d\uff1a<br \/>\nhtpasswd -c .htpasswd USERNAME<\/p>\n<p>\u8fd9\u6837\u5c31\u4f1a\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\u751f\u6210\u4e00\u4e2aUSERNAME\u7684\u5bc6\u7801\u6587\u4ef6\uff0c\u63a5\u4e0b\u6765\u91cd\u590d\u4e24\u6b21\u8f93\u5165\u5bc6\u7801\u540e\u5373\u53ef\u3002<\/p>\n<p>3\u3001\u5982\u679c\u62a5\u8868\u4e2d\u6709\u4e2d\u6587\u5b57\u7b26\uff0c\u53ef\u80fd\u4f1a\u51fa\u73b0\u4e71\u7801\uff0c\u5219\u542f\u7528\u914d\u7f6e\u6587\u4ef6\u4e2d\u4ee5\u4e0b\u90e8\u5206\uff1a<br \/>\nLoadPlugin=&#8221;decodeutfkeys&#8221;<\/p>\n<p>4\u3001\u56e0dreamhost\u5728\u5927\u6d0b\u5f7c\u5cb8\u7684\u673a\u623f\u4e2d\uff0c\u6240\u4ee5\u65f6\u533a\u4e5f\u662f\u9700\u8981\u4fee\u6539\u4e3a+8\u533a\uff1a<br \/>\nLoadPlugin=&#8221;timezone +8&#8243;<\/p>\n<p>5\u3001AWstats\u62e5\u6709\u7b80\u4f53\u4e2d\u6587\u8bed\u8a00\u5305\uff0c\u4fee\u6539\u8fd9\u91cc\u53ef\u4ee5\u8f93\u51fa\u4e2d\u6587\u62a5\u8868\uff1a<br \/>\nLang=&#8221;cn&#8221;<\/p>\n<p>6\u3001\u5982\u679c\u62a5\u8868\u4e2d\u7684\u56fe\u7247\u65e0\u6cd5\u663e\u793a\uff0c\u90a3\u4e48\u4fee\u6539\u4e00\u4e0b\u8fd9\u91cc\uff1a<br \/>\nDirIcons=&#8221;\/statistics\/icon&#8221;<\/p>\n<p><strong>\u53c2\u8003\u8d44\u6599\uff1a<\/strong><br \/>\n1\u3001<a href=\"http:\/\/wiki.dreamhost.com\/index.php\/AWStats\">dreamhost\u5b98\u65b9wiki&#8221;AWStats Installation&#8221;<\/a><br \/>\n2\u3001<a href=\"http:\/\/www.chedong.com\/tech\/awstats.html\">AWStats\u7b80\u4ecb\uff1aApache\/IIS\u7684\u65e5\u5fd7\u5206\u6790\u5de5\u5177<\/a><br \/>\n3\u3001<a href=\"http:\/\/awstats.cn\/\">AWStats \u4e2d\u6587\u5b98\u65b9\u7f51\u7ad9<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u56fd\u5916\u865a\u62df\u4e3b\u673a\u4e00\u822c\u90fd\u76f4\u63a5\u5728\u7ba1\u7406\u754c\u9762\u96c6\u6210\u4e86\u57fa\u4e8e\u670d\u52a1\u5668\u65e5\u5fd7\u5206\u6790\u7684\u6d41\u91cf\u7edf\u8ba1\u7cfb\u7edf\uff0c\u5e38\u89c1\u7684\u6709Webalizer\u3001AWSta [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[18,17,19,20],"class_list":["post-198","post","type-post","status-publish","format-standard","hentry","category-internet","tag-awstats","tag-dreamhost","tag-19","tag-20"],"_links":{"self":[{"href":"https:\/\/www.84tt.com\/web\/index.php?rest_route=\/wp\/v2\/posts\/198","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.84tt.com\/web\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.84tt.com\/web\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.84tt.com\/web\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.84tt.com\/web\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=198"}],"version-history":[{"count":0,"href":"https:\/\/www.84tt.com\/web\/index.php?rest_route=\/wp\/v2\/posts\/198\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.84tt.com\/web\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=198"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.84tt.com\/web\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=198"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.84tt.com\/web\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=198"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}