Installing AWStats on Fedora Server Latest
AWStats is an open-source web analytics tool that generates advanced web, streaming, ftp, or mail server statistics graphically. In this tutorial, we will walk-through the steps to install AWStats on Fedora Server Latest.
Prerequisites
Before you begin, make sure you have the following requirements:
- A Fedora Server Latest installation.
- A sudo user or a root user access.
Step 1: Install Dependencies
AWStats requires some dependencies to function correctly. You can install the dependencies as shown below:
sudo dnf install -y httpd perl perl-CGI perl-CPAN perl-DBD-MySQL perl-DBI perl-Module-Pluggable perl-Time-HiRes \
perl-YAML shellinabox unzip wget
Step 2: Download AWStats
You can download the latest version of AWStats using the following command:
wget https://sourceforge.net/projects/awstats/files/awstats/7.8/awstats-7.8.zip
After downloading the AWStats package, extract it using the following command:
unzip awstats-7.8.zip
Step 3: Create a Configuration File
AWStats requires a configuration file that defines the location of the web server access log and the details of the server to be monitored. To create the configuration file, run the following command:
sudo cp /opt/awstats-7.8/wwwroot/cgi-bin/awstats.model.conf /etc/awstats/awstats.conf
Step 4: Configure AWStats
In AWStats configuration file, you need to make some changes for the AWStats to function correctly. Open the configuration file in your preferred editor:
sudo vi /etc/awstats/awstats.conf
Make the following changes:
- Set the
LogFormatparameter to the web server access log format. If you're using Apache web server, the default access log format isLogFormat = "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"". - Set the
SiteDomainparameter to the domain name or IP address of the server being monitored. - Set the
HostAliasesparameter to the domain name(s) or IP address(es) of the server being monitored. - Set the
LogFileparameter to the location of the web server access log file. If you're using Apache web server, the default access log location is/var/log/httpd/access_log.
Step 5: Generate AWStats Report
After configuring AWStats, you can generate a report by running the following command:
sudo /opt/awstats-7.8/wwwroot/cgi-bin/awstats.pl -update -config=mywebsite
Here, mywebsite is the name of the configuration file without the .conf extension.
Step 6: Access AWStats Report
After generating the report, you can access the AWStats report by opening a web browser and navigating to http://localhost/awstats/awstats.pl?config=mywebsite. Replace mywebsite with the name of your configuration file without the .conf extension.
Conclusion
Congratulations, you have successfully installed and configured AWStats on Fedora Server Latest. You can now monitor the web server statistics through the AWStats graphical interface.