GoAccess is an open source and real-time web log analyzer and an interactive viewer that runs in the terminal. It provides fast and valuable HTTP statistics for system administrators that require a quick and accurate estimate of their web server traffic in real time. In this tutorial, we will learn how to install GoAccess on the MXlinux latest version.
sudo
user.As always, we should start by updating the system packages to the latest available version. It is important to run this command regularly as it may help to fix common bugs, introduce new features, and improve the overall system experience. To do this, open a terminal window and execute the following command:
sudo apt update && sudo apt upgrade -y
After updating the system, we can now install GoAccess on the MXLinux latest version by executing the following command in the terminal:
sudo apt install goaccess -y
This will download and install the latest version of GoAccess on the system. Once it is installed, we can verify if the installation was successful by checking the installed version by running the following command:
goaccess --version
Now that we have installed GoAccess, it is time to analyze our web logs. First, we need to have web servers running and logging data. In this tutorial, we will use Apache web server. GoAccess supports many other web servers such as Nginx, Squid, and IIS.
To analyze the Apache web server logs with GoAccess , we need to configure Apache to write access logs in the Common Log Format (CLF) which is the default format supported by GoAccess. To do this, edit the Apache configuration file by executing the following command:
sudo nano /etc/apache2/apache2.conf
Add the following lines to the file:
# Enable logging
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
After making the changes, save the file and restart Apache service by executing the following command:
sudo systemctl restart apache2
Now, we can start analyzing the Apache access logs by executing the following command in the terminal:
sudo goaccess /var/log/apache2/access.log
GoAccess will start parsing the log file and will show the real-time statistics on the terminal screen.
At this point, you have successfully installed and configured GoAccess on MXLinux latest version. Now you can analyze web logs in real-time using GoAccess. You can also create customized reports, build metrics dashboards, and even generate your own HTML reports.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!