{"id":2970,"date":"2012-05-01T23:30:16","date_gmt":"2012-05-01T15:30:16","guid":{"rendered":"https:\/\/webhostinggeeks.com\/howto\/?p=2970"},"modified":"2023-06-26T21:58:36","modified_gmt":"2023-06-26T21:58:36","slug":"how-to-install-and-configure-apache-log-analizer-awstats-on-fedora-16","status":"publish","type":"post","link":"https:\/\/webhostinggeeks.com\/howto\/how-to-install-and-configure-apache-log-analizer-awstats-on-fedora-16\/","title":{"rendered":"How to Install and Configure Apache log analizer, AWstats on Fedora 16"},"content":{"rendered":"<p>In this guide, we will walk you through the process of installing and configuring AWStats, a powerful Apache log analyzer, on a Fedora 16 Linux server. AWStats is an open-source and feature-rich web analytics reporting tool and server logfile analyzer. It is suitable for analyzing data from various Internet services such as web, streaming media, mail, and FTP servers. It provides you with detailed statistics including visits, unique visitors, pages, hits, rush hours, operating systems, browsers, search engines, keywords, robots visits, broken links, and more.<\/p>\n<p>AWStats is known for its ability to analyze Apache log files, mail log files, and FTP log files. It can generate static or dynamic HTML reports and can process split log files for clusters. It is recognized for its high speed and ability to handle large log formats. Moreover, its functionality can be extended with plugins.<\/p>\n<p>Whether you&#8217;re using a <a href=\"https:\/\/webhostinggeeks.com\/blog\/what-is-dedicated-server-hosting\/\">dedicated server<\/a>, a <a href=\"https:\/\/webhostinggeeks.com\/blog\/what-is-vps-hosting\/\">VPS server<\/a>, or even <a href=\"https:\/\/webhostinggeeks.com\/blog\/what-is-cloud-hosting\/\">cloud hosting<\/a> or <a href=\"https:\/\/webhostinggeeks.com\/blog\/what-is-shared-hosting\/\">shared hosting<\/a>, AWStats can provide you with valuable insights into your server&#8217;s performance and traffic.<\/p>\n<p>Now, let&#8217;s proceed with the installation and configuration of AWStats on a Fedora 16 Linux server.<\/p>\n<h2>Installing AWStats<\/h2>\n<p>To install AWStats, you need to run the following command:<\/p>\n<pre>\r\n[root@fedora16 ~]# yum install awstats -y\r\n<\/pre>\n<p>This command will start the installation process. It will resolve dependencies, run a transaction check, and install the necessary packages. The installation process involves downloading packages, running transaction checks and tests, and finally installing the packages.<\/p>\n<p>Example:<\/p>\n<pre>[root@fedora16 ~]# yum install awstats -y\r\nSetting up Install Process\r\nResolving Dependencies\r\n--&gt; Running transaction check\r\n---&gt; Package awstats.noarch 0:7.0-6.fc16 will be installed\r\n--&gt; Processing Dependency: perl(Switch) for package: awstats-7.0-6.fc16.noarch\r\n--&gt; Processing Dependency: perl(LWP::UserAgent) for package: awstats-7.0-6.fc16.noarch\r\n--&gt; Running transaction check\r\n---&gt; Package perl-Switch.noarch 0:2.16-1.fc16 will be installed\r\n---&gt; Package perl-libwww-perl.noarch 0:6.02-3.fc16 will be installed\r\n--&gt; Processing Dependency: perl(HTTP::Cookies) &gt;= 6 for package: perl-libwww-perl-6.02-3.fc16.noarch\r\n--&gt; Processing Dependency: perl(File::Listing) &gt;= 6 for package: perl-libwww-perl-6.02-3.fc16.noarch\r\n--&gt; Processing Dependency: perl(HTTP::Daemon) &gt;= 6 for package: perl-libwww-perl-6.02-3.fc16.noarch\r\n--&gt; Processing Dependency: perl(WWW::RobotRules) &gt;= 6 for package: perl-libwww-perl-6.02-3.fc16.noarch\r\n--&gt; Processing Dependency: perl(HTTP::Negotiate) &gt;= 6 for package: perl-libwww-perl-6.02-3.fc16.noarch\r\n--&gt; Running transaction check\r\n---&gt; Package perl-File-Listing.noarch 0:6.02-3.fc16 will be installed\r\n---&gt; Package perl-HTTP-Cookies.noarch 0:6.00-3.fc16 will be installed\r\n---&gt; Package perl-HTTP-Daemon.noarch 0:6.00-3.fc16 will be installed\r\n---&gt; Package perl-HTTP-Negotiate.noarch 0:6.00-3.fc16 will be installed\r\n---&gt; Package perl-WWW-RobotRules.noarch 0:6.01-3.fc16 will be installed\r\n--&gt; Finished Dependency Resolution\r\n\r\nDependencies Resolved\r\n\r\n====================================================================================================\r\n Package                     Arch           Version               Repository                   Size\r\n====================================================================================================\r\nInstalling:\r\n awstats                     noarch         7.0-6.fc16            updates                     1.1 M\r\nInstalling for dependencies:\r\n perl-File-Listing           noarch         6.02-3.fc16           Fedora16-Repository          11 k\r\n perl-HTTP-Cookies           noarch         6.00-3.fc16           Fedora16-Repository          25 k\r\n perl-HTTP-Daemon            noarch         6.00-3.fc16           Fedora16-Repository          19 k\r\n perl-HTTP-Negotiate         noarch         6.00-3.fc16           Fedora16-Repository          16 k\r\n perl-Switch                 noarch         2.16-1.fc16           fedora                       21 k\r\n perl-WWW-RobotRules         noarch         6.01-3.fc16           Fedora16-Repository          17 k\r\n perl-libwww-perl            noarch         6.02-3.fc16           Fedora16-Repository         199 k\r\n\r\nTransaction Summary\r\n====================================================================================================\r\nInstall       8 Packages\r\n\r\nTotal download size: 1.4 M\r\nInstalled size: 4.1 M\r\nDownloading Packages:\r\n(1\/8): awstats-7.0-6.fc16.noarch.rpm                                         | 1.1 MB     00:32\r\n(6\/8): perl-Switch-2.16-1.fc16.noarch.rpm                                    |  21 kB     00:00\r\n----------------------------------------------------------------------------------------------------\r\nTotal                                                                38 kB\/s | 1.4 MB     00:39\r\nRunning Transaction Check\r\nRunning Transaction Test\r\nTransaction Test Succeeded\r\nRunning Transaction\r\nWarning: RPMDB altered outside of yum.\r\n  Installing : perl-HTTP-Negotiate-6.00-3.fc16.noarch                                           1\/8\r\n  Installing : perl-HTTP-Daemon-6.00-3.fc16.noarch                                              2\/8\r\n  Installing : perl-HTTP-Cookies-6.00-3.fc16.noarch                                             3\/8\r\n  Installing : perl-File-Listing-6.02-3.fc16.noarch                                             4\/8\r\n  Installing : perl-WWW-RobotRules-6.01-3.fc16.noarch                                           5\/8\r\n  Installing : perl-libwww-perl-6.02-3.fc16.noarch                                              6\/8\r\n  Installing : perl-Switch-2.16-1.fc16.noarch                                                   7\/8\r\n  Installing : awstats-7.0-6.fc16.noarch                                                        8\/8\r\n\r\nInstalled:\r\n  awstats.noarch 0:7.0-6.fc16\r\n\r\nDependency Installed:\r\n  perl-File-Listing.noarch 0:6.02-3.fc16          perl-HTTP-Cookies.noarch 0:6.00-3.fc16\r\n  perl-HTTP-Daemon.noarch 0:6.00-3.fc16           perl-HTTP-Negotiate.noarch 0:6.00-3.fc16\r\n  perl-Switch.noarch 0:2.16-1.fc16                perl-WWW-RobotRules.noarch 0:6.01-3.fc16\r\n  perl-libwww-perl.noarch 0:6.02-3.fc16\r\n\r\nComplete!<\/pre>\n<h2>Configuring AWStats<\/h2>\n<p>Once AWStats is installed, you need to configure it. This involves modifying the AWStats virtual host configuration file for your local server, in this case, fedora16.webhostinggeeks.local.<\/p>\n<pre>\r\n[root@fedora16 ~]# vi \/etc\/awstats\/awstats.fedora16.webhostinggeeks.local.conf\r\n<\/pre>\n<p>In this file, you need to modify the line 122 for the log format in httpd.conf to &#8216;combined&#8217; and set it to &#8216;1&#8217;. Also, modify line 168 to set the IP address to exclude.<\/p>\n<pre>\r\nLogFormat=1\r\nHostAliases=\"localhost 127.0.0.1 REGEX[fedora16\\\\.webhostinggeeks\\\\.local$] REGEX[^192\\\\.168\\\\.1\\\\.]\"\r\n<\/pre>\n<p>Next, you need to modify the main AWStats configuration file, awstats.conf.<\/p>\n<pre>\r\n[root@fedora16 ~]# vi \/etc\/httpd\/conf.d\/awstats.conf\r\n<\/pre>\n<p>In this file, add the following aliases and allow access from your IP range:<\/p>\n<pre>\r\nAlias \/awstatsclasses \"\/usr\/share\/awstats\/wwwroot\/classes\/\"\r\nAlias \/awstatscss \"\/usr\/share\/awstats\/wwwroot\/css\/\"\r\nAlias \/awstatsicons \"\/usr\/share\/awstats\/wwwroot\/icon\/\"\r\nScriptAlias \/awstats\/ \"\/usr\/share\/awstats\/wwwroot\/cgi-bin\/\"\r\nAlias \/report \"\/usr\/share\/awstats\/wwwroot\/\"\r\n\r\nOptions None\r\nAllowOverride None\r\nOrder allow,deny\r\nAllow from 127.0.0.1 192.168.1.0\/24\r\n\r\nSetEnv PERL5LIB \/usr\/share\/awstats\/lib:\/usr\/share\/awstats\/plugins\r\n<\/pre>\n<p>After making these changes, restart the Apache httpd service:<\/p>\n<pre>\r\n[root@fedora16 ~]# systemctl restart httpd.service\r\n<\/pre>\n<h2>Generating Reports<\/h2>\n<p>With AWStats installed and configured, you can now generate reports. To do this, run the following command:<\/p>\n<pre>\r\n[root@fedora16 ~]# \/usr\/share\/awstats\/wwwroot\/cgi-bin\/awstats.pl -config=fedora16.webhostinggeeks.local -update\r\n<\/pre>\n<p>This command will create or update the database for AWStats using the data in the log file. It will bypass old records and search for new records from the beginning of the log file.<\/p>\n<p>Output:<\/p>\n<pre>\r\nCreate\/Update database for config \"\/etc\/awstats\/awstats.fedora16.webhostinggeeks.local.conf\" by AWStats version 7.0 (build 1.971)\r\nFrom data in log file \"\/var\/log\/httpd\/access_log\"...\r\nPhase 1 : First bypass old records, searching new record...\r\nSearching new records from beginning of log file...\r\nJumped lines in file: 0\r\nParsed lines in file: 0\r\n Found 0 dropped records,\r\n Found 0 comments,\r\n Found 0 blank records,\r\n Found 0 corrupted records,\r\n Found 0 old records,\r\n Found 0 new qualified records.\r\n<\/pre>\n<p>Next, generate HTML from the reports:<\/p>\n<pre>\r\n[root@fedora16 ~]# \/usr\/share\/awstats\/wwwroot\/cgi-bin\/awstats.pl -config=fedora16.webhostinggeeks.local -output -staticlink > \/usr\/share\/awstats\/wwwroot\/index.html\r\n<\/pre>\n<h2>Setting Up Cron<\/h2>\n<p>Finally, you need to change the cron&#8217;s setting to ensure that AWStats updates regularly. To do this, open the cron file:<\/p>\n<pre>\r\n[root@fedora16 ~]# vi \/etc\/cron.hourly\/awstats\r\n<\/pre>\n<p>In this file, uncomment and add the following lines:<\/p>\n<pre>\r\n#!\/bin\/bash\r\n\/usr\/share\/awstats\/wwwroot\/cgi-bin\/awstats.pl -config=fedora16.webhostinggeeks.local -update > \/dev\/null\r\n\/usr\/share\/awstats\/wwwroot\/cgi-bin\/awstats.pl -config=fedora16.webhostinggeeks.local -output -staticlink > \/usr\/share\/awstats\/wwwroot\/index.html\r\nexit 0\r\n<\/pre>\n<p>This new cron setting will update AWStats and generate a new HTML report every hour.<\/p>\n<p>With these steps, you have successfully installed and configured AWStats on a Fedora 16 Linux server. Now, you can use AWStats to analyze your server logs and gain valuable insights into your server&#8217;s performance and traffic.<\/p>\n<h2>Commands Mentioned<\/h2>\n<ul>\n<li><span class=\"fw-bold\">yum install awstats -y<\/span> \u2013 This command installs AWStats on your server.<\/li>\n<li><span class=\"fw-bold\">vi \/etc\/awstats\/awstats.fedora16.webhostinggeeks.local.conf<\/span> \u2013 This command opens the AWStats virtual host configuration file for editing.<\/li>\n<li><span class=\"fw-bold\">vi \/etc\/httpd\/conf.d\/awstats.conf<\/span> \u2013 This command opens the main AWStats configuration file for editing.<\/li>\n<li><span class=\"fw-bold\">systemctl restart httpd.service<\/span> \u2013 This command restarts the Apache httpd service.<\/li>\n<li><span class=\"fw-bold\">\/usr\/share\/awstats\/wwwroot\/cgi-bin\/awstats.pl -config=fedora16.webhostinggeeks.local -update<\/span> \u2013 This command creates or updates the AWStats database.<\/li>\n<li><span class=\"fw-bold\">\/usr\/share\/awstats\/wwwroot\/cgi-bin\/awstats.pl -config=fedora16.webhostinggeeks.local -output -staticlink > \/usr\/share\/awstats\/wwwroot\/index.html<\/span> \u2013 This command generates HTML from the AWStats reports.<\/li>\n<li><span class=\"fw-bold\">vi \/etc\/cron.hourly\/awstats<\/span> \u2013 This command opens the cron file for editing.<\/li>\n<\/ul>\n<h2>Conclusion<\/h2>\n<p>AWStats is a powerful tool that provides valuable insights into your server&#8217;s performance and traffic. By installing and configuring AWStats on your Fedora 16 Linux server, you can analyze your server logs and make informed decisions to improve your server&#8217;s performance.<\/p>\n<p>Remember, AWStats is not just for Apache servers. It can analyze data from various Internet services such as web, streaming media, mail, and FTP servers. So, whether you&#8217;re using Apache, Nginx, LiteSpeed, or any other server, you can use AWStats to gain a deeper understanding of your server&#8217;s performance and traffic.<\/p>\n<p>We hope this guide has been helpful in explaining how to install and configure AWStats on a Fedora 16 Linux server. If you have any questions or need further assistance, feel free to ask. Happy analyzing!<\/p>\n<h2>FAQs<\/h2>\n<ol itemscope itemtype=\"https:\/\/schema.org\/FAQPage\">\n<li itemscope itemprop=\"mainEntity\" itemtype=\"https:\/\/schema.org\/Question\">\n<p class=\"fw-bold\" itemprop=\"name\">What is AWStats?<\/p>\n<p itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n                <span itemprop=\"text\">AWStats is an open-source and feature-rich web analytics reporting tool and server logfile analyzer. It is suitable for analyzing data from various Internet services such as web, streaming media, mail, and FTP servers.<\/span>\n            <\/p>\n<\/li>\n<li itemscope itemprop=\"mainEntity\" itemtype=\"https:\/\/schema.org\/Question\">\n<p class=\"fw-bold\" itemprop=\"name\">How do I install AWStats on a Fedora 16 Linux server?<\/p>\n<p itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n                <span itemprop=\"text\">You can install AWStats on a Fedora 16 Linux server by running the command &#8216;yum install awstats -y&#8217;. This will start the installation process, resolve dependencies, run a transaction check, and install the necessary packages.<\/span>\n            <\/p>\n<\/li>\n<li itemscope itemprop=\"mainEntity\" itemtype=\"https:\/\/schema.org\/Question\">\n<p class=\"fw-bold\" itemprop=\"name\">How do I configure AWStats?<\/p>\n<p itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n                <span itemprop=\"text\">You can configure AWStats by modifying the AWStats virtual host configuration file and the main AWStats configuration file. After making the necessary changes, restart the Apache httpd service.<\/span>\n            <\/p>\n<\/li>\n<li itemscope itemprop=\"mainEntity\" itemtype=\"https:\/\/schema.org\/Question\">\n<p class=\"fw-bold\" itemprop=\"name\">How do I generate reports with AWStats?<\/p>\n<p itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n                <span itemprop=\"text\">You can generate reports with AWStats by running the command &#8216;\/usr\/share\/awstats\/wwwroot\/cgi-bin\/awstats.pl -config=fedora16.webhostinggeeks.local -update&#8217;. This will create or update the AWStats database. Then, generate HTML from the reports by running the command &#8216;\/usr\/share\/awstats\/wwwroot\/cgi-bin\/awstats.pl -config=fedora16.webhostinggeeks.local -output -staticlink > \/usr\/share\/awstats\/wwwroot\/index.html&#8217;.<\/span>\n            <\/p>\n<\/li>\n<li itemscope itemprop=\"mainEntity\" itemtype=\"https:\/\/schema.org\/Question\">\n<p class=\"fw-bold\" itemprop=\"name\">How do I set up cron for AWStats?<\/p>\n<p itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n                <span itemprop=\"text\">You can set up cron for AWStats by opening the cron file for editing and uncommenting and adding the necessary lines. The new cron setting will update AWStats and generate a new HTML report every hour.<\/span>\n            <\/p>\n<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>In this guide, we will walk you through the process of installing and configuring AWStats, a powerful Apache log analyzer, on a Fedora 16 Linux server. AWStats is an open-source&#8230;<\/p>\n","protected":false},"author":6,"featured_media":2971,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wds_primary_category":0,"footnotes":""},"categories":[2057],"tags":[1209,2089,1371,1975,1536,1546,1965],"class_list":["post-2970","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-fedora","tag-awstats","tag-configuration","tag-fedora-16","tag-install","tag-linux","tag-linux-utilities","tag-log"],"_links":{"self":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/2970","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/comments?post=2970"}],"version-history":[{"count":0,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/2970\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media\/2971"}],"wp:attachment":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media?parent=2970"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/categories?post=2970"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/tags?post=2970"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}