AWStats rhel6 Installation

Source: Internet
Author: User
Tags apache log file apache log

AWStats is a fast-growing Perl-based web log analysis tool on SourceForge. Compared With Webalizer, an excellent open-source log analysis tool, AWStats has the following advantages:

1. User-friendly: You can directly call the corresponding language interface (Simplified Chinese Version) based on your browser)

2. perl-based: the system can run on GNU/Linux or Windows (after ActivePerl is installed), and the log analysis directly supports the Apache format (combined) and IIS format (need to be modified ). Although Webalizer also has a Windows platform version, it lacks maintenance. AWStats can use a system to complete different Web servers on its own sites: unified statistics on GNU/Linux/Apache and Windows/IIS servers.

3. High Efficiency: the AWStats output statistics project is much richer than Webalizer, and the speed can still reach about 1/3 of Webalizer. This speed is sufficient for websites with millions of daily visits;

4. convenient configuration/customization: The system provides flexible but reasonable configuration rules by default. The default configuration to be modified cannot exceed 3 or 4 items to start running, there are also many plug-ins for Modification and extension;

5. AWStats designers are designed for precise "Human visits", so robot access to many search engines is filtered out, therefore, the statistics may be lower than those of other log statistics tools. Access from within the company can also be filtered out through IP address filtering settings.

6. provides many extended Parameter Statistics functions: using the extraxxxx series configuration to generate Parameter Analysis for specific applications is very useful for product analysis.

 

AWStats is a free, concise, powerful, and personalized statistical tool. It can collect the following information about your site:

I. Visits, visits, page views, clicks, data traffic, etc.

2. Accurate to monthly, daily, and hourly data

3. Visitor country

4. Visitor IP

5. Robots/spiders statistics

6. Spinning customer duration

7. Statistics on different files types

8. pages-URL statistics

9. Visitor Operating System Browser and other information

10: Other information (search keyword, etc)

For more information about Webalizer and analog, see:

Http://awstats.sourceforge.net/#COMPARISON

The AWStats running mode is as follows:

1. Log Analysis: after running, archive the log statistical results into an AWStats database (plain text;

2. There are two forms of output:

One is to read the statistical result database output through the CGI program;

One is to run the background script to export the output to a static file;

 

Go to the official website to download the software source code

Http://nchc.dl.sourceforge.net/project/awstats/AWStats/7.0/awstats-7.0.tar.gz

Install configurations

#Ll awstats-7.0.tar.gz

-RW-r -- 1 Root 1254327 May 23 05:06 awstats-7.0.tar.gz

#Tar xf awstats-7.0.tar.gz

#Music awstats-7.0/usr/local/AWStats

#CD/usr/local/AWStats

#Ls

Docs readme. txt tools wwwroot

#Perl tools/awstats_configure.pl// Configure and install the AWStats Log Analysis Software

 

----- AWStats awstats_configure 1.0 (build 1.9) (c) Laurent destailleur -----

This tool will help you to configure AWStats to analyze statistics

One Web server. You can try to use it to let it do all that is possible

In AWStats setup, however following the step by step manual setup

Documentation (docs/index.html) is often a better idea. abve all if:

-You are not an administrator user,

-You want to analyze downloaded log files without web server,

-You want to analyze mail or FTP log files instead of web log files,

-You need to analyze load balanced servers log files,

-You want to 'understamp' all possible ways to use AWStats...

Read the AWStats documentation (docs/index.html ).

 

-----> Running OS detected: Linux, BSD or Unix

 

-----> Check for Web Server install

 

Enter full config file path of your Web server.

Example:/etc/httpd. conf

Example:/usr/local/apache2/CONF/httpd. conf

Example: C: \ Program Files \ apache group \ apache \ conf \ httpd. conf

Config file path ('none' to skip Web Server SETUP ):

>/Etc/httpd/CONF/httpd. conf // web master configuration file location

 

-----> Check and complete Web Server Config File '/etc/httpd/CONF/httpd. conf'

Add 'Alias/awstatsclasses "/usr/local/AWStats/wwwroot/classes /"'

Add 'Alias/awstatscss "/usr/local/AWStats/wwwroot/CSS /"'

Add 'Alias/awstatsicons "/usr/local/AWStats/wwwroot/icon /"'

Add 'scriptalias/AWStats/"/usr/local/AWStats/wwwroot/cgi-bin /"'

Add' <directory> 'ctive ve

AWStats directives added to Apache config file.

 

-----> Update model Config File '/usr/local/AWStats/wwwroot/cgi-bin/AWStats. model. conf'

File AWStats. model. conf updated.

 

-----> Need to create a new config file?

Do you want me to build a new AWStats config/Profile

File (required if first install) [Y/n]?Y

 

-----> Define config file name to create

What is the name of your web site or profile analysis?

Example: www.mysite.com

Example: Demo

Your web site, virtual server or profile name:

> Www.sxkeji.com.cn

 

-----> Define config file path

In which directory do you plan to store your CONFIG file (s )?

Default:/etc/AWStats

Directory path to store config file (s) (enter for default ):

>

 

-----> Create Config File '/etc/AWStats/awstats.www.sxkeji.com.cn. conf'

Config file/etc/AWStats/awstats.www.sxkeji.com.cn. conf created.

 

-----> Restart web server with '/sbin/service httpd restart'

Stop httpd: [OK]

Starting httpd: [OK]

 

-----> Add update process inside a scheduler

Sorry, configure. pl does not support automatic add to cron yet.

You can do it manually by adding the following command to your cron:

/Usr/local/AWStats/wwwroot/cgi-bin/AWStats. pl-Update-Config = www.sxkeji.com.cn

Or if you have several config files and prefer having only one command:

/Usr/local/AWStats/tools/awstats_updateall.pl now

Press enter to continue...

 

 

A simple config file has been created:/etc/AWStats/awstats.www.sxkeji.com.cn. conf

You shoshould have a look inside to check and change manually main parameters.

You can then manually update your statistics for 'www .sxkeji.com.cn 'with command:

> Perl AWStats. pl-Update-Config = www.sxkeji.com.cn

You can also read your statistics for 'www .sxkeji.com.cn 'with URL:

> Http: // localhost/AWStats. pl? Config = www.sxkeji.com.cn

 

Press enter to finish...

#Mkdir/var/lib/AWStats// Create a data directory file

 

#Vim/etc/AWStats/awstats.www.sxkeji.com.cn. conf

#CAT/etc/AWStats/awstats.www.sxkeji.com.cn. conf | grep-VNE '^ $ | ^ #' | less

51: logfile = "/var/log/httpd/access_log" // Apache Log File Location

63: logtype = W

122: logformat = 1 // use the default log format of httpd

134: logseparator = ""

153: sitedomain = "www.sxkeji.com.cn"

168: hostaliases = "sxkeji.com.cn www.sxkeji.com.cn 127.0.0.1 localhost"

188: dnslookup = 2

203: dirdata = "/var/lib/AWStats" // data directory file

 

Analysis command

#/Usr/local/AWStats/wwwroot/cgi-bin/AWStats. pl -- update -- Config =Www.sxkeji.com.cn

//The configuration file/etc/AWStats/awstats.www.sxkeji.com.cn. conf is automatically called.

Create/update database for config "/etc/AWStats/awstats.www.sxkeji.com.cn. conf" by AWStats version 7.0 (build 1.971)

From data in log file "/var/log/httpd/access_log "...

Phase 1: first bypass old records, searching new record...

Searching New records from beginning of log file...

Phase 2: Now process new records (flush history on disk after 20000 hosts )...

Jumped lines in file: 0

Parsed lines in file: 6

Found 0 dropped records,

Found 0 comments,

Found 0 blank records,

Found 0 successfully upted records,

Found 0 old records,

Found 6 new qualified records.

 

Local access:

Http: // localhost/AWStats. pl? Config = www.sxkeji.com.cn

Non-local access:

Http: // ip/AWStats. pl? Config = www.sxkeji.com.cn

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.