Linux下“网站流量访问统计”软件“awstats”的配置安装使用过程
2011-08-14 16:07
1551 查看
1.从官网下载最新的的awstats,解压缩
# unzip awstats-6.95.zip
# mv awstats-6.95 /usr/local/awstats
2. 安装配置awstats,以我服务器上的网站phpadmin.dean.com为例,根据情况请自行更改网址
Found Web server Apache config file '/etc/httpd/httpd.conf' <=============读取你的httpd配置文件
-----> Check and complete web server config file '/etc/httpd/httpd.conf'
All AWStats directives are already present.
-----> 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) [y/N] ? y <===============第一次需要创建一个新的config fiel
-----> 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:
> phpadmian.dean.com <====================这里输入你要记录的网址,当然是自己httpd服务器上的
-----> 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):
> <================配置文件存放路径,一般默认/etc/awstats即可,直接回车
-----> Create config file '/etc/awstats/awstats.phpadmin.dean.com.conf'
Config file /etc/awstats/awstats.phpadmin.dean.com.conf created.
-----> 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=phpadmin.dean.com
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: /etc/awstats/awstats.phpadmin.dean.com.conf
You should have a look inside to check and change manually main parameters.
You can then manually update your statistics for 'phpadmin.dean.com' with command:
> perl awstats.pl -update -config=phpadmin.dean.com
You can also read your statistics for 'phpadmin.dean.com' with URL:
> http://localhost/awstats/awstats.pl?config=phpadmin.dean.com
Press ENTER to finish... <=============创建成功,按回车退出
3.修改配置文件/etc/awstats/awstats.drupal.dean.com.conf ,找到logFile那一行,将其修给为自己网站的访问日志路径,并且增加一样DataDir指向上面创建的data目录
LogFile="/usr/local/apache/logs/druap.dean.com-access_log"
DataDir="DataDir="/usr/local/awstats/data"
4.生成统计日志网页。
1)首先需要创建/var/lib/awstats目录,否则在生成日志网页的时候报错
This means each line in your web server log file need to have "combined log format" like this:
3)确保awstats.pl有执行权限,否则无法生成日志网页
在浏览器里输入:http://phpadmin.dean.com/awstats/awstats.pl?config=phpadmin.dean.com
效果如下
6.可以将以上命令放到crontab中执行,并根据需要指定更新的频率和时间:
33 6 * * * /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=phpadmin.dean.com >/dev/null 2>&1
# unzip awstats-6.95.zip
# mv awstats-6.95 /usr/local/awstats
2. 安装配置awstats,以我服务器上的网站phpadmin.dean.com为例,根据情况请自行更改网址
[root@server56 LAMP]# cd /usr/local/awstats/ [root@server56 awstats]# mkdir -m 755 data [root@server56 awstats]# perl tools/awstats_configure.pl-----> Check for web server install
Found Web server Apache config file '/etc/httpd/httpd.conf' <=============读取你的httpd配置文件
-----> Check and complete web server config file '/etc/httpd/httpd.conf'
All AWStats directives are already present.
-----> 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) [y/N] ? y <===============第一次需要创建一个新的config fiel
-----> 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:
> phpadmian.dean.com <====================这里输入你要记录的网址,当然是自己httpd服务器上的
-----> 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):
> <================配置文件存放路径,一般默认/etc/awstats即可,直接回车
-----> Create config file '/etc/awstats/awstats.phpadmin.dean.com.conf'
Config file /etc/awstats/awstats.phpadmin.dean.com.conf created.
-----> 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=phpadmin.dean.com
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: /etc/awstats/awstats.phpadmin.dean.com.conf
You should have a look inside to check and change manually main parameters.
You can then manually update your statistics for 'phpadmin.dean.com' with command:
> perl awstats.pl -update -config=phpadmin.dean.com
You can also read your statistics for 'phpadmin.dean.com' with URL:
> http://localhost/awstats/awstats.pl?config=phpadmin.dean.com
Press ENTER to finish... <=============创建成功,按回车退出
3.修改配置文件/etc/awstats/awstats.drupal.dean.com.conf ,找到logFile那一行,将其修给为自己网站的访问日志路径,并且增加一样DataDir指向上面创建的data目录
vim /etc/awstats/awstats.drupal.dean.com.conf
LogFile="/usr/local/apache/logs/druap.dean.com-access_log"
DataDir="DataDir="/usr/local/awstats/data"
4.生成统计日志网页。
1)首先需要创建/var/lib/awstats目录,否则在生成日志网页的时候报错
mkdir /var/lib/awstats2)确保你的网站访问日志格式为combined ,否则会报错
This means each line in your web server log file need to have "combined log format" like this:
3)确保awstats.pl有执行权限,否则无法生成日志网页
chmod +x /usr/local/awstats/wwwroot/cgi-bin/awstats.pl4)生成日志网页
cd /usr/local/awstats/wwwroot/cgi-bin perl awstats.pl updata -config=phpadmin.dean.com5. 查看日志网页
在浏览器里输入:http://phpadmin.dean.com/awstats/awstats.pl?config=phpadmin.dean.com
效果如下
6.可以将以上命令放到crontab中执行,并根据需要指定更新的频率和时间:
33 6 * * * /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=phpadmin.dean.com >/dev/null 2>&1
相关文章推荐
- X86_64平台下Oracle 11g R2 X64 for Linux的软件安装、数据库安装、服务配置、数据库启动和停止、SQLPLus使用
- 使用聚合数据平台对电商网站进行流量以及访问统计
- apache配置网站访问统计awstats
- Linux 下软件配置,编译与安装的基本过程
- 网站访问统计系统Piwik安装使用
- Linux 软件安装使用(4) MPlayer安装、配置及使用
- Linux(CentOS6.x)下使用yum软件管理工具安装LNMP(Nginx+PHP+Mysql)环境并配置虚拟主机vhost
- Linux实现网站流量统计awstats
- linux 下的超级终端软件 kermit 安装,配置及使用
- 在全新安装的IIS7下搭建网站,访问页面时出现错误信息,配置错误: 不能在此路径中使用此配置节。
- Windows下使用Cygwin模拟Linux环境安装配置过程
- awstats 网站访问统计工具安装
- http配置安装和部署Awstats统计Http访问日志
- RHEL 5.4 下安装和使用 ntop 全纪录(ntop:Linux下可通过Web访问的网络流量监控工具)
- 网站访问统计系统Piwik安装使用:支持插件扩展统计媲美Google Analytics
- 快速实现配置Windows客户端访问在linux平台上所搭建的Samba服务器&&使用swat软件
- AWStats 7.0 发布, Linux下的安装配置使用备忘
- MRTG—网络流量监控工具 windows和linux上的安装和使用配置方法 第二十一集 Mrtg系统监控
- 配置使用yum安装升级linux系统和软件
- Linux工具使用之MySQL安装(含配置远程访问)