* 安装apache
下载http://httpd.apache.org/
解压、编译
./configure --prefix=/usr/local/apache2.2 --with-mpm=worker --enable-so --enable-modules=most --enable-mods-shared=all
(备份在/target-path/build/config.nice)
make
make install
* 安装libxml2
下载ftp://xmlsoft.org/libxml2/libxml2-2.7.3.tar.gz
解压、编译
./configuration
make
make install
rpm -qa|grep libxml2
* 安装php
下载http://www.php.net
解压、编译
./configure --with-apxs2=/usr/local/apache2.2/bin/apxs --with-config-file-path=/usr/local/apache2.2/conf/
make
make install
下载http://pear.php.net Config模块
解压、
pear install Config-1.10.11
* 配置apache
编辑conf/httpd.conf
添加模块
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule php5_module modules/libphp5.so
LoadModule env_module modules/mod_env.so
#图片等不记录日志
<FilesMatch "/.(ico|gif|jpg|png|bmp|swf|css|js)">
SetEnv IMAG 1
</FilesMatch>
CustomLog "logs/access_log" combined env=!IMAG
<IfModule usertrack_module>
CookieTracking on
CookieDomain .lingtong.com
CookieExpires "3 years"
CookieName UID
CookieStyle Cookie
</IfModule>
<IfModule php5_module>
<FilesMatch /.php$>
SetHandler application/x-httpd-php
</FilesMatch>
</IfModule>
* StatViz
下载
配置
cp example.conf weblog.conf
vi weblog.conf
LogFilePath=/usr/local/apache2.2/logs/access_log
LogSessIDColumn=10
LogURLColumn=4
LogRefColumn=7
LogDTSColumn=3
LogUAColumn=9
LogStatusColumn=6
LogVHostColumn=0
执行php statviz.php --config=weblog.conf
产生.dot文件
下载graphviz-xxx.msi,win下安装
打开.dot,选png,执行