Deploying Web Log Analysis Service AWStats + JAWStats in RHEL5.4

Source: Internet
Author: User
Tags apache log file apache log
Awstats introduction 1awstats is a Perl-based web log analysis tool that supports cross-platform, user-friendly, and detailed analysis. It also supports multiple language operation interfaces, 2awstats advantages awstats can analyze all the data in web statistics, including access volume, access volume, page, click, peak hours, visitor's operating system, browser type and version, search engine, keyword, Machine Awstats Introduction1 awstats is a web Log Analysis Tool Based on Perl. It can be cross-platform, user-friendly, detailed analysis content, and supports multiple language operation interfaces. 2 AwstatsAdvantages awstats can analyze all the data in web statistics, including access traffic, access quantity, page, click, peak hours, visitor's operating system, browser type and version, search engine, keyword, mechanical access, invalid links, etc. 3 awstats can not only analyze web logs, but also ftp logs and mail logs. Of course, you need to change the Log Type in the configuration file: LogTypeTo specify the log type,

W representativeWeb log file

F representativeFtp log file

M stands for mail log file

S representativeStreaming log file,

Of course, awstats can also combine logs for analysis, and compress log files suchAccess.log.gzAnd so on

4 awstats disadvantages: it occupies a lot of system resources, especially the memory occupied by the system. 2 awstats Installation Configuration

1Before installation, make sure that the system has a perl environment, httpd. If you do not need to install the perl software package, of course, perl is not installed here,

2Install awstats

# Tar xvf awstats-7.0.tar.gz

# Music Video awstats-7.0/usr/local/awstats

# Cd/usr/local/awstats/tools

# Perl awstats_configure_pl

----- 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. confExample:/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 < ------ Note: This is apache. Path of the main configuration file 

-----> 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' '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 < --- Note: Select whether to create a new object configuration file.-----> Define config file name to create

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

Example: www. mysite. comExample: demo

Your web site, virtual server or profile name:

>Www.frank.com<-------Note:This is the code used to create a statistical object.

-----> 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 ):

>/ Etc/awstats< --------- Note: Set awstats Put the configuration file in/etc/awstats Path 

-----> Create config file '/etc/awstats/awstats.www.frank.com. conf'

Config file/etc/awstats/awstats.www.frank.com. conf created.

 

-----> Restart Web server with '/sbin/service httpd restart'Note: restart the apache server

Stopping 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.frank.com

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... <-------- # Press Enter Key

A simple config file has been created:/etc/awstats/awstats.www.frank.com. conf

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

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

> Perl awstats. pl-update-config = www.frank.com

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

> Http: // localhost/awstats. pl? Config = www.frank.com

Press ENTER to finish... < --------- Note: Press Enter Key3. Modify the following items:

# Cd/etc/awstats

# Vim awstats.www.frank.com. conf

LogFile = "/var/log/httpd/mylog. log"

Change to apache Log File

LogFile ="/Var/log/httpd/access_log"

4 Manually create a directory # mkdir/var/lib/awstats Note: This directory is the database inventory directory of awstats 5 Create awstats to initialize Database

# Perl/usr/local/awstats/wwwroot/cgi-bin/awstats. pl-config = www.frank.com-update

Note: Problems

Perl ../wwwroot/cgi-bin // awstats. pl-config = puppet.frank.com

Create/Update database for config "/etc/awstats/awstats.puppet.frank.com. conf" by AWStats version 7.0 (build 1.970)

From data in log file "/usr/local/awstats/tools/logresolvemerge. pl/var/log/httpd/* _ log | "...

Sh:/usr/local/awstats/tools/logresolvemerge. pl: Permission denied

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

Searching new records from beginning of log file...

Error: Command for pipe '/usr/local/awstats/tools/logresolvemerge. pl/var/log/httpd/* _ log | 'failed'

Setup ('/etc/awstats/awstats.puppet.frank.com. conf' file, web server or permissions) may be wrong.

Check config file, permissions and AWStats documentation (in 'docs' directory)

Solution: # chmod u + x/usr/local/awstats/tools/*. pl

6. Make sure that the following configurations are available at the end of the main configuration file of apche. If awstats is not popular, it is configured by default after awstats is installed and configured.

#

# Directives to allow use of AWStats as a CGI

#

Alias/awstatsclasses "/usr/local/awstats/wwwroot/classes /"

Alias/awstatscss "/usr/local/awstats/wwwroot/css /"

Alias/awstatsicons "/usr/local/awstats/wwwroot/icon /"

ScriptAlias/awstats/"/usr/local/awstats/wwwroot/cgi-bin /"

 

#

# This is to permit URL access to scripts/files in AWStats directory.

#

Options None

AllowOverride None

Order allow, deny

Allow from all

Here you can checkAwstatsAnalysis of websites

Http: // IP/awstats. pl? Config = www.frank.com

Note: config is followed by the URL you want to analyze
Related Article

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.