Difference between revisions of "AWStats"

Jump to navigation Jump to search
1,158 bytes added ,  08:42, 22 July 2013
Added install from download
(Added "Add New Robots to Detection")
(Added install from download)
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:


== Installation ==
== Installation ==
=== From Repository ===
# Install the package
# Install the package
#* <code> apt-get install awstats </code>
#* <code> apt-get install awstats </code>
Line 30: Line 31:
</Directory>
</Directory>
</pre>
</pre>
=== From Download ===
# Get the latest version from http://awstats.sourceforge.net/#DOWNLOAD
#* EG <code> wget http://prdownloads.sourceforge.net/awstats/awstats-7.2.tar.gz </code>
# Uncompress
#* EG <code> tar -xzvf awstats-7.2.tar.gz </code>
# If upgrading from a previous version, backup the old version
#* EG <code> mv /usr/local/awstats/ /usr/local/awstats-v7.0 </code>
# Copy the (new) software in
#* EG <code> mv /home/user/awstats-7.2 /usr/local/awstats/ </code>
# Ensure the web folder is executable
#* EG <code> chmod -R a+rx awstats </code>


== Add a Web Site ==
== Add a Web Site ==
Line 81: Line 94:
== Add New Robots to Detection ==
== Add New Robots to Detection ==
Locate the <code>robots.pm</code>, likely to be in one of the following locations, create a backup and then edit...
Locate the <code>robots.pm</code>, likely to be in one of the following locations, create a backup and then edit...
 
* <code> ./usr/share/awstats/lib/robots.pm </code>
* <code> ./usr/local/awstats/wwwroot/cgi-bin/lib/robots.pm </code>


Robots need to be added to two arrays, <code>RobotsSearchIDOrder_listx</code> and <code>RobotsHashIDLib</code>.  <code>RobotsSearchIDOrder_listx</code> is just an index, so if adding a number of new robots, create your listings for <code>RobotsHashIDLib</code>, then create a copy and delete the extraneous bits for <code>RobotsSearchIDOrder_listx</code>.
Robots need to be added to two arrays, <code>RobotsSearchIDOrder_listx</code> and <code>RobotsHashIDLib</code>.  <code>RobotsSearchIDOrder_listx</code> is just an index, so if adding a number of new robots, create your listings for <code>RobotsHashIDLib</code>, then create a copy and delete the extraneous bits for <code>RobotsSearchIDOrder_listx</code>.
Line 93: Line 107:
  'proximic','<a href="http://www.proximic.com/info/spider.php" title="Bot home page [new window]" target="_blank">Proximic</a>',
  'proximic','<a href="http://www.proximic.com/info/spider.php" title="Bot home page [new window]" target="_blank">Proximic</a>',


and an entry such as this for code>RobotsSearchIDOrder_listx</code>
and an entry such as this for <code>RobotsSearchIDOrder_listx</code>
  'proximic',
  'proximic',


Note that robots will only be detected on new stats runs, so to update historical stats, delete the history files and recreate from archived logs (if you have available).
Note that robots will only be detected on new stats runs, so to update historical stats, delete the history files and recreate from archived logs (if you have available).
=== Errors ===
If you get the following error similar to the following after updating the robots file...
* <code>Error: Not same number of records of RobotsSearchIDOrder_listx (total is 789 entries) and RobotsHashIDLib (787 entries without 'unknown') in Robots database.</code>
You've probably added a duplicate robot entry, which will need to be removed/merged with the existing entry - search your backup robots.pm file for a robot that you're trying to add.


[[Category:Monitoring]]
[[Category:Monitoring]]

Navigation menu