亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊(cè) 查看新帖 |

Chinaunix

  平臺(tái) 論壇 博客 文庫(kù)
最近訪(fǎng)問(wèn)板塊 發(fā)新帖
查看: 1076 | 回復(fù): 0
打印 上一主題 下一主題

AWstats 隨筆 [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2009-09-01 16:28 |只看該作者 |倒序?yàn)g覽

#####################################
#
#
#              環(huán)境
#
#   
http://www.awstats.org/
#
#       debian_lenny_x32
#       awstats-6.9
#
#
#####################################
###################
#
#      安裝
#
###################
cd ~
aptitude install bzip2
aptitude install build-essential
wget
http://downloads.sourceforge.net/project/awstats/AWStats/6.9/awstats-6.9.tar.gz?use_mirror=ncu
tar zxvf awstats-6.9.tar.gz
mv awstats-6.9 /usr/local/
/usr/local/awststs-6.9/tools/awstats_configure.pl # perl腳本安裝 回答一些問(wèn)題。 操作步驟如下:
-----------------------------------------------------------------------------------------------
1.改變apache配置文件中l(wèi)og格式由 "common" -> "combined"
2.改變apche配置文件,添加awstats內(nèi)容。
# Directives to add to your Apache conf file to allow use of AWStats as a CGI.
# Note that path "/usr/local/awstats/" must reflect your AWStats Installation path.
#
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
  
3.重啟apache
4.詢(xún)問(wèn)你,提出一個(gè)配置文件名,在/etc/awstats/下,創(chuàng)建相關(guān)配置文件
如:"test.com" -> "awstats.test.com.conf"

#####################
#
#  web AuthBasic驗(yàn)證
#
#####################
# 修改apache配置文件
vim /usr/local/apache2213/conf/httpd.conf
------------------------------------------------------
AuthUserFile /usr/local/apache2213/conf/.passwd
AuthName "Restricted Area For Customers"
AuthType Basic
require valid-user
/usr/local/apache2213/bin/htpasswd -c /usr/local/apache2212/conf/.passwd admin# 生成Passwd文件
cd /usr/local/apache2213/conf/
chown daemon.daemon .passwd
chmod 700 .passwd

####################################
#
#   設(shè)置 配置文件 /var/awstats/...conf
#
####################################
vim /etc/awstats/awstats.test.com.conf
# 日志檔位置
LogFile="/usr/local/apache2213/logs/access_log"
# 日志檔類(lèi)型:W – WEB,S – Streaming,M – Mail,F(xiàn) – FTP
LogType=W
# 日志格式 缺省值是1:Apache日志,2是IIS日志
LogFormat=1
# 主機(jī)名稱(chēng)或網(wǎng)域
SiteDomain="test"
# 主機(jī)別名
HostAliases="test
www.test
127.0.0.1 localhost"
# 存放 awstats 分析完成的資料庫(kù)檔案存放目錄
# "." 保存在 /awstats當(dāng)前目錄 即.../wwwroot/cgi-bin/目錄
DirData="."
# 執(zhí)行 awstats 的目錄:更改成之前在 httpd.conf 或 awstats.conf 中設(shè)定 ailas 的路徑
DirCgi=”/awstats”
# 圖示目錄:更改成之前在 httpd.conf 或 awstats.conf 中設(shè)定 ailas 的路徑
DirIcons="/awstatsicons"
# 是否允許在統(tǒng)計(jì)頁(yè)面直接更新數(shù)據(jù)1:允許 0:不允許
AllowToUpdateStatsFromBrowser=1
###################
#
#    刷新 數(shù)據(jù)
#
###################
/usr/local/awstats-6.9/wwwroot/cgi-bin/awstats.pl -config=test -update
----------------------------------------------------------------------------------------------------------
Create/Update database for config "/etc/awstats/awstats.test.conf" by AWStats version 6.9 (build 1.925)
From data in log file "/usr/local/apache2213/logs/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: 166
Found 0 dropped records,
Found 0 corrupted records,
Found 0 old records,
Found 166 new qualified records.

###################
#
#    crontab
#
###################
crontab -e
* */1 * * * (cd /usr/local/awstats-6.9/cgi-bin/; ./awstats.pl -config=test -update)
######################
#
#    靜態(tài) html 訪(fǎng)問(wèn)
#
######################
/usr/local/awstats-6.9/wwwroot/cgi-bin/awstats.pl -config=test -output -staticlinks > test.html
######################
#
#    動(dòng)態(tài).pl 訪(fǎng)問(wèn)
#
######################
# 監(jiān)控頁(yè)面
http://192.168.5.20/awstats/awstats.pl?config=test
######################
#
#      GeoIP
#
######################
##################
# GeoIP C Library
cd ~
aptitude install zlib1g-dev
wget
http://geolite.maxmind.com/download/geoip/api/c/GeoIP.tar.gz
tar zxvf GeoIP.tar.gz
cd GeoIP-1.4.6
./configure
make;make install
#####################
# Geo::IP Perl Module  
cd ~
wget
http://geolite.maxmind.com/download/geoip/api/perl/Geo-IP-1.38.tar.gz
tar zxvf Geo-IP-1.38.tar.gz
cd Geo-IP-1.38
perl Makefile.PL
make
make test
make install
##################
# 修改  配置文件
LoadPlugin=”tooltips”
LoadPlugin=”geoip GEOIP_STANDARD /usr/local/awstats-6.9/wwwroot/cgi-bin/GeoIP.dat”
LoadPlugin=”geoip_city_maxmind GEOIP_STANDARD /usr/local/awstats-6.9/wwwroot/cgi-bin/GeoLiteCity.dat”
#######################
# ip地址數(shù)據(jù)庫(kù) 下載
cd /usr/local/awstats-6.9/wwwroot/cgi-bin/
wget
http://www.maxmind.com/download/geoip/database/GeoIP.dat.gz
wget
http://www.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
gunzip Geo*
######################
#
#  qq hostinfo 插件
#
######################
###########
# 下載 插件
cd /usr/local/awstats-6.9/wwwroot/cgi-bin/plugins
wget
http://www.ieasy.org/download/qqhostinfo.pm
wget
http://www.ieasy.org/download/qqwry.pl
#################
# 下載 QQIP數(shù)據(jù)庫(kù)  
# patch: /usr/local/awstats-6.9/wwwroot/cgi-bin
#
http://www.cz88.net/fox/
################
# 修改 IP分析腳本
vim /usr/local/awstats-6.9/wwwroot/cgi-bin/plugins/qqwry.pl
# 修改 QQWry.Dat 的目錄
---------------------------------------------------------------
...
my $ipfile="/usr/local/awstats-6.9/wwwroot/cgi-bin/QQWry.Dat";
...
#########################################
# 修改 awstats 配置文件 添加qqhostinfo插件
# 大概在LoadPlugin="hostinfo"的后面增加一行  LoadPlugin="qqhostinfo"
vim /etc/awstats/awstats.test.conf
-------------------------------------
...
#LoadPlugin="hostinfo"
LoadPlugin="qqhostinfo"
...


########################################################################################################################
# 其他
# apache 滾動(dòng)日志
CustomLog "|/usr/sbin/cronolog /data/logfile/access_%Y-%m-%d.log" combined
# 對(duì)應(yīng) awstats 配置文件
LogFile="/data/logfile/access_%YYYY-24%MM-24%DD-24.log"












本文來(lái)自ChinaUnix博客,如果查看原文請(qǐng)點(diǎn):http://blog.chinaunix.net/u1/45949/showart_2043219.html
您需要登錄后才可以回帖 登錄 | 注冊(cè)

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號(hào)-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號(hào):11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專(zhuān)區(qū)
中國(guó)互聯(lián)網(wǎng)協(xié)會(huì)會(huì)員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過(guò)ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請(qǐng)注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP