Detailed tutorial on Awstats installation and configuration under Linux

Source: Internet
Author: User

1. Download Awstats and Cronolog installation packages to the following websites:

http://sourceforge.net/projects/awstats/

http://www.cronolog.org

2, decompression and installation files

1) The tar xzvf awstats-version.tgz are as follows:

Data Docs README. TXT Tools Wwwroot

(1) Default installation method

Go to the Tools directory to run awstats_configure.pl files:

Perl awstats_configure.pl

Set the Awstats as prompted

Mainly includes: the publication of the directory, configuration files stored in the directory and other information specified, generally use the default settings can be


File Save path:
E:for Netserverawstats
————————————————————————————————————————————
1. Installation Activeperl-5.10.0.1004-mswin32-x86-287188.msi
2. Installation Awstats
3. Modify IIS Log records
Date
Time
C-ip
Cs-username
Cs-method
Cs-uri-stem
Cs-uri-query
Sc-status
Sc-bytes
Cs-version
CS (user-agent)
CS (Referer)
Do not select anything else.

4, modify the configuration file
The awstats.model.conf in the Cgi-bin directory is modified to awstats.www.junzimen.com.conf
Add the following record and put the corresponding variable in the previous file # off

Logfile= "D:logfilesw3svc1ex%yy-0%mm-0%dd-0.log"
logformat=2
Allowtoupdatestatsfrombrowser=0
Sitedomain= "Www.junzimen.com"

Loadplugin= "Qqhostinfo"
Loadplugin= "Decodeutfkeys"
Loadplugin= "Geoipfree"
loadplugin= "TimeZone +8"
"The gray section needs extended module support, in the last


5. Increase IIS extension options
To enable "Perl CGI Extension" and "Perl ISAPI Extension" in Web Service extensions

6. Set up under the Cgi-bin. BAT boot file so that it can be placed in the Windows Planning task.
D:awstatswwwrootcgi-binawstats.pl-update-lang=cn-config=www.junzimen.com

Output test:
Single output: d:awstatswwwrootcgi-bin>awstats.pl-config=www.junzimen.com-output-staticlinks > awstats.www.html
Whole station output: Perl d:/awstats/tools/awstats_buildstaticpages.pl-config=www.junzimen.com-lang=cn-output-awstatsprog=d:/ awstats/wwwroot/cgi-bin/awstats.pl-dir=d:/awstats/wwwroot/-staticlinksext=html

7, IIS Settings
Create a virtual directory Cgi-bin, map to Awstats Cgi-bin folder, access rights to select "execute (such as ISAPI application or CGI)"
Set up the virtual directory icon, map to the Awstats icon folder.

Enter http://localhost/cgi-bin/awstats.pl?config=www.junzimen.com in the address bar

To see if you can access it properly, the prerequisite is that you perform a "Perl d:awstatswwwrootcgi-binawstats.pl-update-lang=cn-config=www.junzimen.com" command, Of course, if you run this command immediately after the configuration, there may be an error, because we set the logfile= "C:/windows/system32/logfiles/ex%yy-24%mm-24%dd.log", which means yesterday's log, You should look at the command prompt to see if there is a log in your folder.


Add Attachments:
If you have trouble, you can also play Windows Advantage, using the window interface, direct input ppm, which will run the Perl Package Manager, you can manage the module.
Here we update some useful modules at once:
PPM Install Geo::ip::P Ureperl
PPM Install geography::countries
PPM Install Ip::country
PPM Install Geo-ipfree
PPM Install Net-xwhois
Simply paste the above command into the DOS box and install it automatically.

And then to the template (awstats.www.junzimen.com.conf) modify

# to open the IP counter check plug
Loadplugin= "Geoipfree"

# Open Decodeutfkeys plug-in, solve the "search for the keyword" garbled
Loadplugin= "Decodeutfkeys"

# Set log time for IIS
loadplugin= "TimeZone +8″ good, so the setting is ready, Awstats has been able to work very well."

# Plugin:qqhostinfo, show the visitor area, the following statement needs to be added manually.
Loadplugin= "Qqhostinfo"

To add records manually:
Qqhostinfo need qqhostinfo.pm, qqwry.pl, qqwry.dat3 files, put them all into the Cgi-bin directory of Plug-ins, modify qqwry.pl files,
Change the value of my $ipfile = to "D:/awstats/wwwroot/cgi-bin/plugins/qqwry.dat";


Question:
1, Error: Warning:perl versions before 5.6 cannot handle nested includes
Logoff: #Include "Awstats.www.junzimen . com.conf "
2, do not generate Data
Logoff: Logformat =" Data time ... "
Modify to: logformat=2
3, error:awstats database directory de Fined in config file by ' dirdata ' parameter (/var/lib/awstats) does not exist.
Setup ('/etc/awstats/awstats.www.youdomains.com.conf ' file, Web server or permissions) May is wrong.
Check config file, permissions and AWStats documentation (in ' Docs ' directory).
This is because the directory defined in Dirdata in/etc/awstats/awstats.www.youdomains.com.conf does not have permission to start Apache, changing directories or changing permissions can be resolved.
After the junzimen server restarts, our network will be able to browse normally.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.