How To Install awstats on Debian 9
Introduction
In this tutorial we learn how to install awstats on Debian 9.
What is awstats
awstats is:
Advanced Web Statistics (AWStats) is a powerful web server logfile analyzer written in perl that shows you all your web statistics including visits, unique visitors, pages, hits, rush hours, search engines, keywords used to find your site, robots, broken links and more. Gives more detailed information and better graphical charts than webalizer, and is easier to use. Works with several web server log format as a CGI and/or from command line. Supports more than 30 languages.
There are three methods to install awstats on Debian 9. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.
Install awstats Using apt-get
Update apt database with apt-get using the following command.
sudo apt-get update
After updating apt database, We can install awstats using apt-get by running the following command:
sudo apt-get -y install awstats
Install awstats Using apt
Update apt database with apt using the following command.
sudo apt update
After updating apt database, We can install awstats using apt by running the following command:
sudo apt -y install awstats
Install awstats Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.
sudo aptitude update
After updating apt database, We can install awstats using aptitude by running the following command:
sudo aptitude -y install awstats
How To Uninstall awstats on Debian 9
To uninstall only the awstats package we can use the following command:
sudo apt-get remove awstats
Uninstall awstats And Its Dependencies
To uninstall awstats and its dependencies that are no longer needed by Debian 9, we can use the command below:
sudo apt-get -y autoremove awstats
Remove awstats Configurations and Data
To remove awstats configuration and data from Debian 9 we can use the following command:
sudo apt-get -y purge awstats
Remove awstats configuration, data, and all of its dependencies
We can use the following command to remove awstats configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge awstats
Dependencies
awstats have the following dependencies:
References
Summary
In this tutorial we learn how to install awstats package on Debian 9 using different package management tools: apt, apt-get and aptitude.