How to install goaccess in Centos/Fedora/Ubuntu

GoAccess is an interactive command line tool to analyse apache2/apache-httpd/ngnix logs.

It provides realtime HTTP statistics for website administrators.

GoAccess will provide following statistics:

  •  Unique visitors per day – Including spiders
  •  Requested files (Pages-URL)
  • Requested static files – (Static content: png,js,etc)
  • Referrers URLs
  •  HTTP 404 Not Found response code
  •  Operating Systems
  • Browsers
  • Hosts
  • HTTP Status Codes
  • Top Referring Sites
  • Top Keyphrases used on Google’s search engine

Install GoAccess in Ubuntu/Debian based operating systems:

$ apt-get install goaccess

Install GoAccess in RHEL/Fedora/Centos base operating systems:

In RHEL/Fedora/Centos base operating systems there is no single command available to install GoAccess. We need to install it from source code.

First install dependency packages with following command:

$ yum install glib2 glib2-devel glibc make geoip ncurses-devel

Download GoAccess source code:

$ wget

Uncompress source code:

$ tar xzf goaccess-0.4.2.tar.gz

Now install it by running following commands:

$ cd goaccess-0.4.2

$ ./configure

$ make; make install

Following are options available with goaccess command:

Usage: goaccess [ -b ][ -s ][ -e IP_ADDRESS][ – a ]< -f log_file >

The following options can also be supplied to the command:

-f <argument> – Path to input log file.
-b – Enable total bandwidth consumption.
For faster parsing, don’t enable this flag.
-s – Enable HTTP status codes report.
For faster parsing, don’t enable this flag.
-a – Enable a List of User-Agents by host.
For faster parsing, don’t enable this flag.
-e <argument> – Exclude an IP from being counted under the
HOST module. Disabled by default.

Example commands:

$ goaccess -f /var/log/httpd/access_log

$ goaccess -s -b -e 192.168.*.*  -f /var/log/httpd/access_log


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s