AWStats site statistics Tool installation manual

Source: Internet
Author: User

Awstats-6.6 installation configuration notes

Related urls:

AWStats: http://awstats.sourceforge.net/

Cronolog: http://www.cronolog.org

Environment: Linux Redhat as 3, Apache 2.2.6 Tomcat-5.5.26

 

Step 1> intercept and install

1. install Apache and Tomcat and connect Apache to Tomcat,

2. Place the downloaded awstats-6.6.tar.gz in the/usr/local/src directory.

3. CD/usr/local/src

4. Tar xzvf awstats-6.6.tar.gz

Rename the servlets-cgi.renametojar (under the catalina_home/Server/lib/directory) to the servlets-cgi.jar.

Modify the tomcat configuration file % atat_home %/CONF/Web. xml so that Tomcat can support CGI scripts.
Uncomment the servlet configuration file.

<Servlet>

<Servlet-Name> CGI </servlet-Name>

<Servlet-class> org. Apache. Catalina. servlets. cgiservlet </servlet-class>

<Init-param>

<Param-Name> debug </param-Name>

<Param-value> 0 </param-value>

</Init-param>

<Init-param>

<Param-Name> cgipathprefix </param-Name>

<Param-value> WEB-INF/cgi </param-value>

</Init-param>

<Load-on-startup> 5 </load-on-startup>

</Servlet>

 

Uncomment the configuration file of this servlet mapping.

<Servlet-mapping>

<Servlet-Name> CGI </servlet-Name>

<URL-pattern>/cgi-bin/* </url-pattern>

</Servlet-mapping>

In this way, Tomcat supports CGI.

 

 

Step 2> install cronolog

Set cronolog- 1.6.2 Put .tar.gz under/usr/local/src

5. Tar xzvf cronolog- 1.6.2 .Tar.gz

CD cronolog- 1.6.2
Configure
Make
Make install
After the installation is complete, the following two files are generated in the/usr/local/sbin directory:
Cronolog cronosplit
3. Modify the httpd. conf file of Apache.
Set the file name for log generation:
Customlog "|/usr/local/sbin/cronolog/var/log/httpd/access_awstat. % Y % m % d" combined

Step 3> deploy AWStats

Copy and rename the AWStats/wwwroor/cgi-bin directory to your/WEB-INF/cgi Directory
Rename/WEB-INF/cgi/AWStats. model. conf to common. conf
Use common. conf as the default configuration file and introduce it to the custom configuration file. This saves a lot of trouble.
Create and edit the AWStats. $ {mydomain}. conf file and add the following configuration items.

($ {Mydomain} is your website domain name)

 

Include "common. conf"

Logfile = "/var/log/httpd/access_awstat. % YYYY-0 % MM-0 % DD-0"

Sitedomain = "ks.kousen.com"

Hostaliases = "localhost 127.0.0.1"

Defaultfile = "index. jsp"

Dirdata = "/var/lib/AWStats"

 

Copy AWStats/wwwroor/icon to your web/icon

 

Run AWStats
CD webroot/WEB-INF/cgi/webroot is the project directory
./AWStats. pl-config =$ {mydomain}-update for example: www.yourdomain.com

 

Finally, the configuration script runs on time every day.

Crontab-e enter the following script

# AWStats Autorun

5 *** (CD/usr/local/src/AWStats/wwwroot/cgi-bin/;./AWStats. pl-Update-Config = test.kousen.com)

The server automatically updates the statistics at 5 o'clock every hour. (Can be adjusted according to individual needs)

 

Restart Apache and tomcat

Enter http: // $ {mydomain}/cgi-bin/AWStats. pl

View results

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.