awstats日誌分析系統部署(httpd)

來源:互聯網
上載者:User

標籤:awstats日誌分析系統部署

1.確認apache已經安裝:

netstat -utpln |grep 80

2.下載與解壓:

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.當提示設定檔名稱時,輸入:

http://www.gxfc.com

####配置結束###

4.修改awstats設定檔:

vim /etc/awstats/awstats.http://www.gxfc.com.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://http://www.gxfc.com/awstats/awstats.pl?config=http://www.gxfc.com

編寫簡化頁面:

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

<html>

  <head>

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

  </head>

  <body></body>

</html>

:wq

訪問:

http://http://www.gxfc.com/aws.html


本文出自 “11628205” 部落格,請務必保留此出處http://11638205.blog.51cto.com/11628205/1917157

awstats日誌分析系統部署(httpd)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.