首页 > 其他 > 详细

awstats日志分析系统部署

时间:2017-11-14 15:27:58      阅读:225      评论:0      收藏:0      [点我收藏+]

1.确认apache已经安装:

netstat -utpln |grep 80

2.下载与解压:

lftp ftp.linuxyy.cn-->cd tools-->get awstats-7.3.tar.gz

tar zxvf awstats-7.3.tar.gz 

mv awstats-7.3  /usr/local/awstats

3.配置awstats:

cd  /usr/local/awstats/tools

chmod +x ./*

./awstats_configure.pl  

#####开始配置###

a.当提示输入httpd.conf时输入并回车继续:

/usr/local/httpd/conf/httpd.conf

b.其他提示输入:y回车继续

c.当提示配置文件名称时,输入:

www.linuxyy.cn

####配置结束###

4.修改awstats配置文件:

vim /etc/awstats/awstats.www.linuxyy.cn.conf

LogFile="/usr/local/httpd/logs/access_log"   ##修改第 50 行

:wq

mkdir /var/lib/awstats

5.设置计划任务并重启服务器:

echo "*/5 * * * *  /usr/local/awstats/tools/awstats_updateall.pl now" >/var/spool/cron/root   ##每个5分更新一次

/usr/local/awstats/tools/awstats_updateall.pl now  ##执行首次更新

/usr/local/httpd/bin/apachectl  restart

netstat -utpln |grep 80

/etc/init.d/crond  restart

crontab -l

chkconfig crond on

6.访问测试:

http://www.linuxyy.cn/awstats/awstats.pl?config=www.linuxyy.cn

编写简化页面:

vim /usr/local/httpd/htdocs/aws.html

<html>

  <head>

    <meta http-equiv="refresh" content="0; url=http://www.linuxyy.cn/awstats/awstats.pl?config=www.linuxyy.cn" />

  </head>

  <body></body>

</html>

:wq

访问:

http://www.linuxyy.cn/aws.html


本文出自 “11628205” 博客,请务必保留此出处http://11638205.blog.51cto.com/11628205/1981621

awstats日志分析系统部署

原文:http://11638205.blog.51cto.com/11628205/1981621

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!