Awstats open source install centos 7

Installation of Awstats For Analysing Apache Logs

Awstats is an Open Source Log file analyser for advanced statistics. Installation of Awstats is preety easy in Linux.

This can be used for web analytics reporting tool, suitable for data from web internet like web, streaming media etc. 

It can also analyse the log file and provides you in html format to view the report.

Few Points About Awstats

Sometime it becomes the difficult to analyse the Apache log file using command “awk“.

So i found this open source tool to analyse the Apache log with gui mode which saved a lot of time for me.

Data is visualised in bar and tables graph. There’s also same tool like Goaccess which helps you to analyse the live web traffic in real time. 

Note : You must have Virtual-Host configured and apache installed on the machine.

Awstats is a very important tool when you’re not able to analyse the traffic on your website. So it’s a simple way to achieve that. It’s very easy to install and configured.

You can also set the Crontab to reduce your manually work to update the database Everyday.

Lets Begin Installation of Awstats 

Step 1 : Install the Epel Repository

yum install epel-release -y

yum repolist

After Installing Epel Repository, You have to install the awstats package which is available in Epel repo.

Check Out : Enable EPEL Release Repository

Step 2 : Install the awstats Package from Epel repository

yum install awstats -y

Installed : awstats.noarch 0:7.7-1.el7

Step 3 : Make some changes in Configuration file

cd /etc/awstats/

Check Out : Disable HTTP TRACE Or TRACK Request In Httpd (Apache)


Now you need to change Domain, DirData and HostAliases value in this file.




Step 4 : Create a awstats directory

mkdir -p /var/www/html/awstats

Check Out : Create Apache Image Using Dockerfile

Change the folder permission,

chown -R apache:apache /var/www/html/awstats

Step 5 : Here you have to configure the awstats

Edit the awstats file,

vim /etc/httpd/conf.d/awstats.conf

Step 6 : Make a host Entry in /etc/hosts

Check Out : Install Varnish Cache To Speed Up Apache Performance

Step 7 : You must have Selinux disabled.

Step 8 : Now you have to update the configuration file.

cd /usr/share/awstats/wwwroot/cgi-bin/

perl -update

Step 9 : Now try to access the awstats with below URL,

Change with your Server_ip or Domain name.

Check Out : How To Hide Apache Server Name

Now you check all the traffic on your Apache server with the help of awstats.

Set Up Crontab

It’s recommended to create a crontab for awstats to regularly update the database using newly created log entries.

vim /etc/crontab

*/20 * * * * root /usr/share/awstats/wwwroot/cgi-bin/ -update

You’re done

Leave a Reply

Notify of