AWStats log analysis deployment
Experimental environment:
1. Log analysis tool awstats software package download address: https://sourceforge.net/projects/awstats/files/latest/download?source=typ_redirect
The steps of the experiment:
Install the awstats software package and provide the configuration environment
-configure httpd.conf-
Vim / etc/httpd/conf/httpd.conf
Listen 192.168.100.20 80 / / listens on the local host IP address
# Listen 80
ServerName www.benet.com:80
Service httpd restart
Service iptables stop
Setenforce 0
-install the awstats package-
Mkdir / abc
Mount.cifs / / 192.168.100.102/gx / abc
Tar zxvf awstats-7.7.tar.gz-C / opt
Mv / opt/awstats-7.7/ / usr/local/awstats / / easy to manage
2. Configure awstats
-install dns service to provide domain name resolution-
Yum install bind
Vim / etc/named.conf
Vim / etc/named.rfc1912.zones
Cd / var/named/
Cp-p named.localhost benet.com.zone
Vim benet.com.zone
Service named start
-configure the awstats file-
Cd / usr/local/awstats/tools
. / awstats_configure.pl
Config file path ('none' to skip web server setup):
> / etc/httpd/conf/httpd.conf / / enter the configuration file path
Your web site, virtual server or profile name:
> www.benet.com / / enter the domain name
All other "y" or enter
-Editing log files to be monitored-
Vim / etc/awstats/awstats.www.benet.com.conf
LogFile= "/ var/log/httpd/access_log" / / modify the access log file
Cd / var/lib
Mkdir awstats
Service httpd restart
-- using host access testing--
Http://www.benet.com/awstats/awstats.pl?config=www.benet.com
III. Supplementary settings
-periodically update data--
Cd / usr/local/awstats/tools/
. / awstats_updateall.pl / / Update data
Crontab-e
* / 5 * / usr/local/awstats/tools/awstats_uptateall.pl now / / perform an update every 5 minutes
Service crond restart
Chkconfig-level 35 crond on
-- set access control
Vim / etc/httpd/conf/httpd.conf
Service httpd restart
-optimize page length--
Vim / var/www/html/www.html
Content of the experiment:
Install the awstats software package and provide the configuration environment
1. Configure httpd.conf
two。 Install the awstats package
2. Configure awstats
-install dns service to provide domain name resolution-
Vim / etc/named.conf
Vim / etc/named.rfc1912.zones
Vim benet.com.zone
-configure the awstats file-
Refer to the experimental procedure for detailed steps.
-Editing log files to be monitored-
-- using host access testing--
Http://www.benet.com/awstats/awstats.pl?config=www.benet.com
III. Supplementary settings
-periodically update data--
-- set access control
Vim / etc/httpd/conf/httpd.conf
Service httpd restart
-optimize page length--
Vim / var/www/html/www.html