国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 服務(wù)器 > Linux服務(wù)器 > 正文

Awstats for Linux簡易安裝、配置測試

2024-09-05 23:01:53
字體:
供稿:網(wǎng)友

awstats簡易安裝文檔

  step 1 安裝

  1、 安裝apache2.2.0

  tar jxvf httpd-2.2.0 tar.bz2

  cd httpd-2.2.0

  vi config.sh

  #!/bin/bash

  HTTPD_ROOT="/usr/local/apps/apache2"

  ./configure ——prefix=$HTTPD_ROOT /

  ——enable-so /

  ——enable-rewrite /

  ——enable-info /

  ——enable-cgid /

  ——enable-mime-magic /

  ——enable-vhost-alias /

  ——enable-deflate /

  ——enable-expires /

  ——with-mpm=prefork

  sh config.sh

  make

  make install

  2 、安裝awstats6.5

  tar zxvf awstats-6.5.tar.gz

  mv awstats-6.5 /usr/apps/local/awstats

  step 2 配置

  1、apache配置

  vi /usr/local/apps/apache2/conf/httpd.conf

  DocumentRoot /usr/local/apps/awstats/wwwroot/

  ServerName irunnet.com

  ErrorLog "/usr/local/apps/apache2/logs/irunnet-error_log"

  CustomLog "/usr/local/apps/apache2/logs/irunnet-access_log" combined

  [root@mail bin]# ./apachectl stop

  [root@mail bin]# ./apachectl start

2、awstats配置

  A、運(yùn)行配置腳本生成awstats的配置文件

  cd /usr/local/apps/awstats/tools

  perl awstats_configure.pl

>> 默認(rèn)生成的配置文件會放在/etc/awstats/下面,名稱為awstats.www.irunnet.com.conf
>>默認(rèn)安裝后重啟apache

  [root@mail bin]# ./apachectl stop

  [root@mail bin]# ./apachectl start

  B、編輯/etc/awstats/awstats.www.irunnet.com.conf

>>1 設(shè)置web server的logfile位置

  編輯LogFile為web server的log文件位置

  LogFile=/usr/local/apps/apache2/logs/irunnet-access_log

  [確認(rèn)和httpd.conf中的log文件保證一致,httpd.conf中l(wèi)og: logs/irunnet-access_log]

>>2 設(shè)置要分析的服務(wù)日志類型

  LogType=W

  w表示為WEB日志

>>3 設(shè)置日志格式

  LogFormat=1

  1表示采用NCSA apache combined/ELF/XLF log format

>>4 設(shè)置所要分析網(wǎng)站域名

  SiteDomain=www.irunnet.com

  HostAliases="irunnet.com 61.162.XXX.YYY localhost"

>>5 設(shè)置awstats的數(shù)據(jù)庫存放目錄

  DirData="/usr/local/apps/awstats/data"[data需要手動建立]

>>6 設(shè)置DirCgi

  DirCgi="/usr/local/apps/awstats/wwwroot/cgi-bin"

  DirIcons="/icon/"[這里icon是DocumentRoot /usr/local/awstats/wwwroot/下]

  C、awstats權(quán)限修改

  [root@irunnet awstats]# cd /usr/apps/local/apps

  [root@irunnet apps]# chown -R root:root awstats

  [root@irunnet apps]# chmod -R 755 awstats

  [root@irunnet apps]# cd awstats

  [root@irunnet awstats]# mkdir data

  [root@irunnet awstats]#chown -R nobody data[nobdy為apache運(yùn)行用戶]

  [root@irunnet awstats]#chmod -R 755 data

  [root@irunnet awstats]#cd wwwroot/cgi-bin

  [root@irunnet cgi-bin]# perl awstats.pl -config=www.irunnet.com -update -lang=cn

  [root@irunnet cgi-bin]# perl awstats.pl -config=www.irunnet.com -output -staticlinks -lang=cn>awstats.www.irunnet.com.html

  [root@irunnet cgi-bin]# chmod 777 /usr/local/apps/awstats/wwwroot/cgi-bin/*.pl

  D、修改etc/awstats/awstats.www.irunnet.com.conf

  AllowToUpdateStatsFromBrowser=1

  step 3 測試

  http://www.irunnet.com/awstats/awstats.pl?config=www.irunnet.com

  step 4 日志統(tǒng)計(jì)自動運(yùn)行

  10 8 * * * (cd /usr/local/apps/www/awstats/cgi-bin/awstats/;./awstats.pl -config=www.irunnet.com -update -lang=cn)

發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 财经| 澎湖县| 阜南县| 垦利县| 都昌县| 和田市| 日喀则市| 新泰市| 建瓯市| 德保县| 维西| 沈阳市| 松滋市| 吉首市| 即墨市| 视频| 商丘市| 蚌埠市| 石景山区| 建德市| 大理市| 靖宇县| 昆明市| 隆林| 深泽县| 松滋市| 德惠市| 界首市| 东乡县| 牡丹江市| 荆州市| 鹰潭市| 城市| 大英县| 永新县| 吉隆县| 香河县| 涡阳县| 龙南县| 抚远县| 方城县|