Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Steps to install AWStatsWEB in linux Apache environment

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains the "steps to install AWStatsWEB in the linux Apache environment". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn the steps of installing AWStatsWEB in the linux Apache environment.

1. Create a directory awstats,cd / home/awstats under home

2.wget http://awstats.sourceforge.net/files/awstats-7.0.tar.gz, downloads the latest version 7.0 of awstats

3. Installation

The code is as follows:

[root@JMAppSer 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 for

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. Above 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 'understand' 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

Found Web server Apache config file'/ usr/local/apache/conf/httpd.conf'

-> Check and complete web server config file'/ usr/local/apache/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''directive

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) [yplink 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.b2bweb.co

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

> / usr/local/awstats/config

-> Create config file'/ usr/local/awstats/config/awstats.www.b2bweb.co.conf'

Config file / usr/local/awstats/config/awstats.www.b2bweb.co.conf created.

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

Usage: / etc/init.d/httpd [- D name] [- d directory] [- f file]

[- C "directive"] [- c "directive"]

[- k start | restart | graceful | graceful-stop | stop]

[- v] [- V] [- h] [- l] [- L] [- t] [- S]

Options:

-D name: define a name for use in directives

-d directory: specify an alternate initial ServerRoot

-f file: specify an alternate ServerConfigFile

-C "directive": process directive before reading config files

-c "directive": process directive after reading config files

-e level: show startup errors of level (see LogLevel)

-E file: log startup errors to file

-v: show version number

-V: show compile settings

-h: list available command line options (this page)

-l: list compiled in modules

-L: list available configuration directives

-t-D DUMP_VHOSTS: show parsed settings (currently only vhost settings)

-S: a synonym for-t-D DUMP_VHOSTS

-t-D DUMP_MODULES: show all loaded modules

-M: a synonym for-t-D DUMP_MODULES

-t: run syntax check for config files

-> 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.b2bweb.co

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: / usr/local/awstats/config/awstats.www.b2bweb.co.conf

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

You can then manually update your statistics for 'www.b2bweb.co' with command:

> perl awstats.pl-update-config=www.b2bweb.co

You can also read your statistics for 'www.b2bweb.co' with URL:

> http://localhost/awstats/awstats.pl?config=www.b2bweb.co

Press ENTER to finish...

[root@JMAppSer tools] # cp / usr/loca/awstats/wwwroot/icon / usr/local/apache/htdocs/awstatsicons-rf

Cp: cannot stat "/ usr/loca/awstats/wwwroot/icon": there is no such file or directory

[root@JMAppSer tools] #

[root@JMAppSer tools] #

[root@JMAppSer tools] # ls

Awstats_buildstaticpages.pl awstats_exportlib.pl geoip_generator.pl logresolvemerge.pl nginx webmin

Awstats_configure.pl awstats_updateall.pl httpd_conf maillogconvert.pl urlaliasbuilder.pl xslt

[root@JMAppSer tools] # cd..

[root@JMAppSer awstats] # ls

Awstats-7.0 awstats-7.1 awstats-7.1.zip config docs README.TXT tools wwwroot

[root@JMAppSer awstats] # ll

Total 1508

Drwxr-xr-x 5 1000 1000 4096 2010-12-06 awstats-7.0

Drwxr-xr-x 5 root root 4096 11-22 17:52 awstats-7.1

-rw-r--r-- 1 root root 1505352 11-22 18:02 awstats-7.1.zip

Drwxr-xr-x 2 root root 4096 11-25 10:21 config

Drwxr-xr-x 4 root root 4096 11-22 18:04 docs

-rw-r--r-- 1 root root 6787 11-22 18:04 README.TXT

Drwxr-xr-x 5 root root 4096 11-22 18:04 tools

Drwxr-xr-x 7 root root 4096 11-22 18:04 wwwroot

[root@JMAppSer awstats] # cd wwwroot/

[root@JMAppSer wwwroot] # ls

Cgi-bin classes css icon js

[root@JMAppSer wwwroot] # cp icon/ / usr/local/jiemai/apache-blogs/htdocs/awstatsicons-rf

[root@JMAppSer wwwroot] #

[root@JMAppSer wwwroot] #

[root@JMAppSer wwwroot] # pwd

/ usr/local/awstats/wwwroot

[root@JMAppSer wwwroot] # cd..

[root@JMAppSer awstats] # ls

Awstats-7.0 awstats-7.1 awstats-7.1.zip config docs README.TXT tools wwwroot

[root@JMAppSer awstats] # ls

Awstats-7.0 awstats-7.1 awstats-7.1.zip config docs README.TXT tools wwwroot

[root@JMAppSer awstats] # ll

Total 1508

Drwxr-xr-x 5 1000 1000 4096 2010-12-06 awstats-7.0

Drwxr-xr-x 5 root root 4096 11-22 17:52 awstats-7.1

-rw-r--r-- 1 root root 1505352 11-22 18:02 awstats-7.1.zip

Drwxr-xr-x 2 root root 4096 11-25 10:21 config

Drwxr-xr-x 4 root root 4096 11-22 18:04 docs

-rw-r--r-- 1 root root 6787 11-22 18:04 README.TXT

Drwxr-xr-x 5 root root 4096 11-22 18:04 tools

Drwxr-xr-x 7 root root 4096 11-22 18:04 wwwroot

[root@JMAppSer awstats] # cd config/

[root@JMAppSer config] # ls

Awstats.www.b2bweb.co.conf

[root@JMAppSer config] # vi awstats.www.b2bweb.co.conf

# AWSTATS CONFIGURE FILE 7.0

#-

# Copy this file into awstats.www.mydomain.conf and edit this new config file

# to setup AWStats (See documentation in docs/ directory).

# The config file must be in / etc/awstats, / usr/local/etc/awstats or / etc (for

# Unix/Linux) or same directory than awstats.pl (Windows, Mac, Unix/Linux...)

# To include an environment variable in any parameter (AWStats will replace

# it with its value when reading it), follow the example:

# Parameter= "_ _ ENVNAME__"

# Note that environment variable AWSTATS_CURRENT_CONFIG is always defined with

# the config value in an AWStats running session and can be used like others.

#-

# $Revision: 1.353 $- $Author: eldy $- $Date: 14:19:22$ on 2012-02-15

#-

# MAIN SETUP SECTION (Required to make AWStats work)

#-

# LogFile "contains the web, ftp or mail server log file to analyze.

# Possible values: A full path, or a relative path from awstats.pl directory.

# Example: "/ var/log/apache/access.log"

# Example: ".. / logs/mycombinedlog.log"

# You can also use tags in this filename if you need a dynamic filename

# depending on date or time (Replacement is made by AWStats at the beginning

# of its execution). This is available tags:

#% YYYY-n is replaced with 4 digits year we were n hours ago

#% YY-n is replaced with 2 digits year we were n hours ago

#% MM-n is replaced with 2 digits month we were n hours ago

#% MO-n is replaced with 3 letters month we were n hours ago

#% DD-n is replaced with day we were n hours ago

#% HH-n is replaced with hour we were n hours ago

#% NS-n is replaced with number of seconds at 00:00 since 1970

#% WM-n is replaced with the week number in month (1-5)

#% Wm-n is replaced with the week number in month (0-4)

#% WY-n is replaced with the week number in year (01-52)

#% Wy-n is replaced with the week number in year (00-51)

#% DW-n is replaced with the day number in week (1-7, 1=sunday)

# use 24 if you need (1-7, 1=monday)

#% Dw-n is replaced with the day number in week (0-6, 0=sunday)

# use 24 if you need (0-6, 0=monday)

# Use 0 for n if you need current year, month, day, hour...

# Example: "/ var/log/access_log.%YYYY-0%MM-0%DD-0.log"

# Example: "C:/WINNT/system32/LogFiles/W3SVC1/ex%YY-24%MM-24%DD-24.log"

# You can also use a pipe if log file come from a pipe:

# Example: "gzip-d

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report