linux awstats搭建
1安裝lnmp模式
2安裝awstats
mkdir /var/lib/awstats
chmod 755 /usr/local/awstats
cd /usr/local/awstats/ 進入到解壓目錄下
ls
cd tools/
ls
perl awstats_configure.pl
1 Config file path (‘none’ to skip web server setup):
none 默認填寫none就OK
2 Do you want me to build a new AWStats config/profile
file (required if first install) [y/N] ? y 默認yes就OK
3 Your web site, virtual server or profile name:
www.linuxidc.com 上面介紹過通過www.linuxidc.com來訪問 并針對這個頁面進
行日志分析
4 Default: /etc/awstats 默認的配置文件存放位置
Directory path to store config file(s) (Enter for default):
敲enter鍵默認即可
OK 交互界面結束
2 配置awstats的配置文件
cd /etc/awstats
vim awstats.www.linuxidc.com.conf
/usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=bbs.linuxidc.com
4 配置web的配置文件
vim /etc/httpd/conf/httpd.conf
//在行尾添加如下內容
This is to permit URL access to scripts/files in AWStats directory.
5 重啟服務
#service httpd restart
6、手動更新網站的統計數據
cd /usr/local/awstats/wwwroot/cgi-bin/
perl awstats.pl -update -config=www.linuxidc.com
注: 如果需要將某統計信息生成為靜態的html頁面,使用以下命令即可實現:
perl /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -output=pagetype -config=www.linuxidc.com > /var/www/html/awstats.www.linuxidc.com.html 7、將上面的命令放入定期任務列表中
1 5 * * * /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=www.linuxidccom >/dev/null 2>&1
總結
以上是生活随笔為你收集整理的linux awstats搭建的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: mysql安装教程8.0.21安装,Wi
- 下一篇: Linux cJSON库的使用、编译为c