One of the popular and open source log file analyzer program for Linux and Unix systems is called GoAccess. This popular software is written in C language and is used to analyze log files. This command line software enables you to monitor log files in real-time. GoAccess runs in terminal and provides you a dashboard with separate panels to organize statics. Another feature of GoAccess is its ability to create log files with easy to understand formats such as HTML, JSON, and CSV. In this tutorial we will show you steps of GoAccess Installation on CentOS 7.
Notice: To execute commands you need to have root access. If not, you can start commands with “sudo".
Install GoAccess on CentOS 7
Step 1: Install required repository
In this tutorial we want to install GoAccess from its source code. This kind of installation needs some dependencies that are not provided by official repository. First install Epel repository using the bellow command:
yum install epel-release
After installing the Epel repository, update your repository list using the following command:
Step 2: Install 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: Install GoAccess
GoAccess official website is www.goaccess.io and you can download desired version of GoAccess from its site. In this step we want to install vesrion 2.1 . Use bellow command to download GoAccess:
tar xvzf goaccess-1.2.tar.gz
To configure and make source, execute the following commands:
./configure --enable-utf8 --enable-geoip=legacy
make && make install
Using the below command create a Symlink of GoAccess binary file in your executable path:
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:
to learn more about GoAccess you can execute the below command:
Congratulations! In this article, you have learnt how to Install GoAccess on CentOS 7.
If you are facing any problem with the installation, feel free to comment here. We will help you to solve the issue.