Step by Step Guide to Install GoAccess on Ubuntu 20.04

GoAccess is a free & open source web log analyzer, written in C. It provides text-based and a web application user interface. We can monitor real time web logs.

There are few steps to install GoAccess on ubuntu:

Step 1: Update the System.

apt-get update

Step 2: Install the required packages.

apt-get install libncursesw5-dev gcc make
apt-get install libgeoip-dev libtokyocabinet-dev

Step 3: Download GoAccess on system.

wget http://tar.goaccess.io/goaccess-1.2.tar.gz

  • Here is the command output.

  • Extract the download file.

tar -xzvf goaccess-1.2.tar.gz

Step 4: Run the following commands for Configure & Install the packages.

cd goaccess-1.2
./configure --enable-utf8 --enable-geoip=legacy

  • Here is the command output.

  • Run the following commands.

make
make install

  • Create a link of goaccess in the /usr/bin directory.

ln -s /usr/local/bin/goaccess /usr/bin/goaccess

Step 5: Install Apache2.

apt-get install apache2

  • Start & Enable the apache2.

systemctl start apache2
systemctl enable apache2

  • Check the apache2 status

systemctl status apache2

  • Here is the command output.


Step 6: Test GoAccess.

  • To analyze the log using GoAccess.

goaccess /var/log/apache2/access.log --log-format=COMBINED

  • Here is the command output.

  • To generate an HTML log report.

goaccess /var/log/apache2/access.log --log-format=COMBINED -a -o /var/www/html/report.html
Step 7: Open Web browser for accessing the report.html file.
http://server-ip/report.html

  • Here is the output.

Leave a Reply

Your email address will not be published. Required fields are marked *