How to Install GoAccess on CentOS 7

r00t April 23, 2018

Install GoAccess on CentOS 7

In this tutorial we’ll learn how to install GoAccess on CentOS 7. We will also install and configure its prerequisites. GoAccess is an Open-source software written in C language and has a simple yet important duty: Analyze log files. GoAccess allow you to monitor logs on a real-time basis in either the terminal or a web browser. It processes many types of web access logs. It allows you to generate reports in HTML, JSON, and CSV format.

I recommend to use a minimal CentOS server setup as a basis for the tutorial, that can be a virtual or a root server image with an CentOS 7 minimal install from a web hosting company or you use our minimal server tutorial to install a server from scratch.

Install GoAccess on CentOS 7

Step 1. First, ensure your system and apt package lists are fully up-to-date by running the following:

yum -y install epel-release
yum -y update

Step 2. Installing dependencies.

To compile GoAccess program from its source code we need to install the following packages:

yum install ncurses-devel gcc
yum install geoip-devel tokyocabinet-devel

Step 3. Installing GoAccess on CentOS 7.

First, download the latest stable version of GoAccess from the official website:

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

Extract the “tar” file using the command below:

tar xvzf goaccess-1.2.tar.gz

Configure and install the package:

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

Create a Symlink of GoAccess binary file in your executable path using the command below:

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

Step 4. Using GoAccess.

In order to see your log file using GoAccess, you can use the bellow command:

goaccess /var/log/yum.log

To learn more about GoAccess you can execute the below command:

goaccess --help

Congratulation’s! You have successfully install GoAccess on your CentOS 7 server. Thanks for using this tutorial for installing GoAccess open source web log analyzer on CentOS 7 system.

The Tags:

Leave a Comment

Comments are closed.