{"id":3421,"date":"2019-01-18T22:48:16","date_gmt":"2019-01-18T14:48:16","guid":{"rendered":"https:\/\/ellery.no-ip.info\/wp\/thinkingmore\/?p=3421"},"modified":"2019-01-18T22:48:24","modified_gmt":"2019-01-18T14:48:24","slug":"goaccess","status":"publish","type":"post","link":"https:\/\/ellery.no-ip.info\/wp\/thinkingmore\/2019\/01\/goaccess\/","title":{"rendered":"goaccess"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u5b89\u88dd<\/h2>\n\n\n\n<pre class=\"wp-block-preformatted\"># \u6700\u65b0\u7248<br>echo \"deb http:\/\/deb.goaccess.io\/ $(lsb_release -cs) main\" | sudo tee -a \/etc\/apt\/sources.list.d\/goaccess.list<br>wget -O - https:\/\/deb.goaccess.io\/gnugpg.key | sudo apt-key add -<br>sudo apt update &amp;&amp; sudo apt install goaccess<\/pre>\n\n\n\n<p>\u8981\u53ef\u4ee5\u4f7f\u7528 &#8211;keep-db-files \u5f97\u5b89\u88dd goaccess-tcb<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4f7f\u7528<\/h2>\n\n\n\n<p>\u8a73\u7d30\u7684\u4f7f\u7528\u53ef\u4ee5\u770b <a href=\"https:\/\/goaccess.io\/man\">\u624b\u518a<\/a>\uff0c\u4ee5\u4e0b\u662f\u5e38\u7528\u7684\u7528\u6cd5<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># Console<br>goaccess --log-format=COMBINED -f \/var\/log\/apache2\/access.log<br><br># \u5148\u8a62\u554f\u8981\u600e\u9ebc\u89e3\u6790 log<br>goaccess -c -f \/var\/log\/apache2\/access.log<br><br># \u8f38\u51fa HTML (\u7279\u5b9a\u7248\u672c\u4ee5\u5f8c\u624d\u6709)<br>goaccess --log-format=COMBINED -f \/var\/log\/apache2\/access.log -o report.html<br><br># \u8f38\u51fa realtime HTML (\u7279\u5b9a\u7248\u672c\u4ee5\u5f8c\u624d\u6709)<br>goaccess --log-format=COMBINED -f \/var\/log\/apache2\/access.log --real-time-html\u00a0-o report.htm<\/pre>\n\n\n\n<p>\u6709\u591a\u500b log (\u542b .gz) \u7684\u60c5\u6cc1\uff0c\u53ef\u4ee5\u53c3\u8003\u00a0<a href=\"https:\/\/github.com\/allinurl\/goaccess\/issues\/600\">https:\/\/github.com\/allinurl\/goaccess\/issues\/600<\/a><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># \u5148\u89e3\u6790\u4e26\u5b58\u5230 db<br>zcat \/var\/log\/nginx\/access.log*gz | goaccess -p \/etc\/goaccess.conf -a -o \/dev\/null --keep-db-files<br># \u5f9e db \u8f09\u5165\u8cc7\u6599\uff0c\u4e26\u4e14\u89e3\u6790\u6700\u65b0\u7684 access.log<br>goaccess -p \/etc\/goaccess.conf -f \/var\/log\/nginx\/access.log --real-time-html -a -o \/usr\/share\/nginx\/html\/goaccess.html --load-from-disk<\/pre>\n\n\n\n<p><a href=\"https:\/\/beanbag.technicalissues.us\/easy-automatic-generation-of-goaccess-stats\/\">Automatically generate GoAccess stats<\/a>\u00a0\u7684\u8655\u7406\u66f4\u8cbb\u5de5\uff0c\u9084\u653e\u5230 git \u53bb\uff0c\u6211\u89ba\u5f97\u883b\u503c\u5f97\u7814\u7a76\u7684\u3002\u6211\u53ea\u5927\u7565\u770b\u4e00\u4e0b\uff0c\u5f8c\u4f86\u6c92\u7528\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b89\u88dd # \u6700\u65b0\u7248echo &#8220;deb http:\/\/deb.goaccess.io\/ $(lsb_release -cs) main&#8221; | sudo tee -a \/etc\/apt\/sources.list.d\/goaccess.listwget -O &#8211; https:\/\/deb.goaccess.io\/gnugpg.key | sudo apt-key add -sudo apt update &amp;&amp; sudo apt install goaccess \u8981\u53ef\u4ee5\u4f7f\u7528 &#8211;keep-db-files \u5f97\u5b89\u88dd goaccess-tcb \u4f7f\u7528 \u8a73\u7d30\u7684\u4f7f\u7528\u53ef\u4ee5\u770b \u624b\u518a\uff0c\u4ee5\u4e0b\u662f\u5e38\u7528\u7684\u7528\u6cd5 # Consolegoaccess &#8211;log-format=COMBINED -f \/var\/log\/apache2\/access.log# \u5148\u8a62\u554f\u8981\u600e\u9ebc\u89e3\u6790 loggoaccess -c -f \/var\/log\/apache2\/access.log# \u8f38\u51fa HTML (\u7279\u5b9a\u7248\u672c\u4ee5\u5f8c\u624d\u6709)goaccess &#8211;log-format=COMBINED -f \/var\/log\/apache2\/access.log -o report.html# \u8f38\u51fa realtime &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/ellery.no-ip.info\/wp\/thinkingmore\/2019\/01\/goaccess\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;goaccess&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[5],"tags":[177],"class_list":["post-3421","post","type-post","status-publish","format-standard","hentry","category-idea","tag-goaccess"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/s2MOxp-goaccess","_links":{"self":[{"href":"https:\/\/ellery.no-ip.info\/wp\/thinkingmore\/wp-json\/wp\/v2\/posts\/3421","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ellery.no-ip.info\/wp\/thinkingmore\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ellery.no-ip.info\/wp\/thinkingmore\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ellery.no-ip.info\/wp\/thinkingmore\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ellery.no-ip.info\/wp\/thinkingmore\/wp-json\/wp\/v2\/comments?post=3421"}],"version-history":[{"count":2,"href":"https:\/\/ellery.no-ip.info\/wp\/thinkingmore\/wp-json\/wp\/v2\/posts\/3421\/revisions"}],"predecessor-version":[{"id":3423,"href":"https:\/\/ellery.no-ip.info\/wp\/thinkingmore\/wp-json\/wp\/v2\/posts\/3421\/revisions\/3423"}],"wp:attachment":[{"href":"https:\/\/ellery.no-ip.info\/wp\/thinkingmore\/wp-json\/wp\/v2\/media?parent=3421"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ellery.no-ip.info\/wp\/thinkingmore\/wp-json\/wp\/v2\/categories?post=3421"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ellery.no-ip.info\/wp\/thinkingmore\/wp-json\/wp\/v2\/tags?post=3421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}