{"id":4030,"date":"2019-08-19T22:43:16","date_gmt":"2019-08-19T19:43:16","guid":{"rendered":"https:\/\/kifarunix.com\/?p=4030"},"modified":"2019-08-19T22:43:16","modified_gmt":"2019-08-19T19:43:16","slug":"install-goaccess-on-fedora-30-fedora-29","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-goaccess-on-fedora-30-fedora-29\/","title":{"rendered":"Install GoAccess On Fedora 30\/Fedora 29"},"content":{"rendered":"\n<p>Follow through this guide to learn how to install GoAccess on Fedora 30\/Fedora 29. <a rel=\"noreferrer noopener\" aria-label=\"GoAccess (opens in a new tab)\" href=\"https:\/\/goaccess.io\/\" target=\"_blank\">GoAccess<\/a> is an opensource real-time visual and interactive web log analyzer that can run on both the terminal and browser.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Install GoAccess On Fedora 30\/Fedora 29<\/h2>\n\n\n\n<p>GoAccess is available on the default Fedora repositories. However, the available versions may not be the latest stable release version. Hence, the surest way is to install GoAccess from source as this ensures that you got the latest version running. As of this writing, GoAccess v1.3 is latest version.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Run system update<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf update<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Install required dependencies<\/h3>\n\n\n\n<p>Usually, <strong>Ncurses<\/strong> is the only required dependency. However, we are going to install it, required build tools and other optional dependencies.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf install ncurses-devel gcc make geoip-devel tokyocabinet-devel openssl-devel<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Download GoAccess Tarball<\/h3>\n\n\n\n<p>Run the command below to download GoAccess v1.3 source code.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>wget https:\/\/tar.goaccess.io\/goaccess-1.3.tar.gz<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Extract the Source Code<\/h3>\n\n\n\n<p>Once the download is done, extract the source code.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>tar xzf goaccess-1.3.tar.gz<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Configure GoAccess<\/h3>\n\n\n\n<p>Next, navigate to GoAccess source directory and run the configure script to prepare GoAccess for installation on your Fedora system.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>cd goaccess-1.3\/\n.\/configure --enable-utf8 --enable-geoip=legacy<\/code><\/pre>\n\n\n\n<p>If the configuration completes successfully, you should be able to get such a summary below;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>...\nYour build configuration:\n\n  Prefix         : \/usr\/local\n  Package        : goaccess\n  Version        : 1.3\n  Compiler flags :  -pthread\n  Linker flags   : -lncursesw -lGeoIP -lpthread  \n  Dynamic buffer : no\n  Geolocation    : GeoIP Legacy\n  Storage method : In-memory Hash Database (Default)\n  TLS\/SSL        : no\n  Bugs           : goaccess@prosoftcorp.com<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Compile and Install GoAccess on Fedora 30\/Fedora 29<\/h3>\n\n\n\n<p>Run the commands below to compile and install GoAccess.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>make\nmake install<\/code><\/pre>\n\n\n\n<p>If the installation is successful, GoAccess binary is placed on <strong>\/usr\/local\/bin\/goaccess<\/strong>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Using GoAccess<\/h3>\n\n\n\n<p>GoAccess can be run on the terminal to generate log analysis results to standard output or as html report. The basic command line syntax for GoAccess is;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>goaccess [filename] [options\u2026] [-c][-M][-H][-q][-d][\u2026]<\/code><\/pre>\n\n\n\n<p>The most basic usage is to pass the log to analyse to GoAccess. For example;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>goaccess \/var\/log\/httpd\/access.log<\/code><\/pre>\n\n\n\n<p>This will open a Log, date and time format configuration prompt.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/08\/log-date-time.png\"><img loading=\"lazy\" decoding=\"async\" width=\"550\" height=\"467\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/08\/log-date-time.png\" alt=\"Install GoAccess on Ubuntu 18.04\/Debian 10 Buster\" class=\"wp-image-4011\" title=\"\"><\/a><\/figure>\n\n\n\n<p>Press space bar to select the format and press Enter to analyze the logs. The log analysis dashboard is presented on the terminal.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/08\/goaccess-dashboards.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1356\" height=\"726\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/08\/goaccess-dashboards.png\" alt=\"GoAccess dashboards\" class=\"wp-image-4012\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/08\/goaccess-dashboards.png 1356w, https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/08\/goaccess-dashboards-768x411.png 768w\" sizes=\"(max-width: 1356px) 100vw, 1356px\" \/><\/a><\/figure>\n\n\n\n<p>Scroll up and down to view dashboards.<\/p>\n\n\n\n<p>If the logs being analyzed doesn\u2019t support the default log formats for GoAccess, you can specify your log format, date and time format with the options,&nbsp;<strong>\u2013log-format<\/strong>,&nbsp;<strong>\u2013date-format<\/strong>&nbsp;and&nbsp;<strong>\u2013time-format<\/strong>.<\/p>\n\n\n\n<p>For example, if you have squid logs with the EPOCH timestamp;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>goaccess \/var\/squid\/logs\/access.log --log-format='%x.%^ %~ %L %h %^\/%s %b %m %U %^' --date-format=%s --time-format=%s<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/08\/squid-logs-analysis.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1354\" height=\"724\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/08\/squid-logs-analysis.png\" alt=\"GoAccess Squid Logs analysis\" class=\"wp-image-4013\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/08\/squid-logs-analysis.png 1354w, https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/08\/squid-logs-analysis-768x411.png 768w\" sizes=\"(max-width: 1354px) 100vw, 1354px\" \/><\/a><\/figure>\n\n\n\n<p>If you need to display the analysis on a web format, save the output of a log file into an HTML file on your web root directory. In this case, you need to have a web server installed, we are using Apache in this guide,<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf install httpd<\/code><\/pre>\n\n\n\n<p>To generate a web report, for Apache Access logs;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>goaccess \/var\/log\/httpd\/access.log --log-format=COMBINED -a -o \/var\/www\/html\/analysis.html<\/code><\/pre>\n\n\n\n<p>If you access your browser via&nbsp;<strong>http:\/\/&lt;server-IP&gt;\/analysis.html<\/strong>&nbsp;you should be able to see your GoAccess analytic dashboards.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/08\/goaccess-web-report.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1356\" height=\"656\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/08\/goaccess-web-report.png\" alt=\"GoAccess Web Reports for apache access logs\" class=\"wp-image-4014\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/08\/goaccess-web-report.png 1356w, https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/08\/goaccess-web-report-768x372.png 768w\" sizes=\"(max-width: 1356px) 100vw, 1356px\" \/><\/a><\/figure>\n\n\n\n<p>For analyzing squid logs with custom format;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>goaccess \/var\/squid\/logs\/access.log --log-format='%x.%^ %~ %L %h %^\/%s %b %m %U %^' --date-format=%s --time-format=%s -a -o \/var\/www\/html\/analysis.html<\/code><\/pre>\n\n\n\n<p>Access the report via&nbsp;<strong>http:\/\/&lt;server-IP&gt;\/analysis.html<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/08\/goaccess-web-report-squid-logs.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1349\" height=\"655\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/08\/goaccess-web-report-squid-logs.png\" alt=\"Goaccess squid logs analysis\" class=\"wp-image-4015\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/08\/goaccess-web-report-squid-logs.png 1349w, https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/08\/goaccess-web-report-squid-logs-768x373.png 768w\" sizes=\"(max-width: 1349px) 100vw, 1349px\" \/><\/a><\/figure>\n\n\n\n<p>To parse the logs and display the stats in a real-time HTML report, use the&nbsp;<strong>\u2013real-time-html<\/strong>&nbsp;option.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>goaccess access.log --log-format=COMBINED -a -o \/var\/www\/html\/report.html --real-time-html<\/code><\/pre>\n\n\n\n<p>You can as well monitor logs on a remote server without having to install GoAccess on those servers via SSH. For example, read remote Apache logs line by line and pass it to GoAccess;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>ssh root@192.168.42.62 'while IFS= read -r line; do echo \"$line\" &amp;&amp; sleep 1 ; done &lt; \/root\/access.log' | goaccess --log-format=COMBINED -a -o \/var\/www\/html\/remote.html --real-time-html -<\/code><\/pre>\n\n\n\n<p>The report for the remote server is then available under&nbsp;<strong>http:\/\/&lt;server-IP&gt;\/remote.html<\/strong>.<\/p>\n\n\n\n<p>Well that is just it on how to install GoAccess on Ubuntu 18.04\/Debian 10 Buster. To learn more about GoAccess, read the GoAccess manual page,\u00a0<a rel=\"noreferrer noopener\" href=\"https:\/\/goaccess.io\/man\" target=\"_blank\">https:\/\/goaccess.io\/man<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Related Tutorials<\/h3>\n\n\n\n<p><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/install-goaccess-on-ubuntu-18-04-debian-10-buster\/\" target=\"_blank\">Install GoAccess on Ubuntu 18.04\/Debian 10 Buster<\/a><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Follow through this guide to learn how to install GoAccess on Fedora 30\/Fedora 29. GoAccess is an opensource real-time visual and interactive web log analyzer<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[1083,121,72],"tags":[289,924,1084,1086,1085],"class_list":["post-4030","post","type-post","status-publish","format-standard","hentry","category-goaccess","category-howtos","category-monitoring","tag-fedora-29","tag-fedora-30","tag-goaccess","tag-log-analysis","tag-log-analyzers","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/4030"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=4030"}],"version-history":[{"count":1,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/4030\/revisions"}],"predecessor-version":[{"id":4031,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/4030\/revisions\/4031"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=4030"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=4030"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=4030"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}