In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
AWStats log analysis system an open source log analysis system developed by Perl language can be used to analyze the access log information of servers such as Apache,Samba,Vsftpd,IIS, combined with planned task services such as crond, and can analyze the log content on a regular basis. A Linux service host (192.168.13.132), a win7 testing PC 1Jing yum installs http and bind services [root@localhost] # yum install httpd bind-y2 Configure DNS configuration file [root@localhost ~] # vim / etc/named.conf # # main configuration file options {listen-on port 53 {any }; # # Native listening for all listen-on-v6 port 53 {:: 1;}; directory "/ var/named"; dump-file "/ var/named/data/cache_dump.db"; statistics-file "/ var/named/data/named_stats.txt" Memstatistics-file "/ var/named/data/named_mem_stats.txt"; recursing-file "/ var/named/data/named.recursing"; secroots-file "/ var/named/data/named.secroots"; allow-query {any;} # # allow all 3, configure region configuration text etc/named.rfc1912.zones) [root@localhost ~] # vim / etc/named.rfc1912.zones # # configure region configuration file zone "localhost" IN {# # copy two templates to type master; file "named.localhost" below Allow-update {none;};}; zone "kgc.com" IN {# # modify localhost to kgc.com type master; file "kgc.com.zone"; # # create region data profile allow-update {none };} four, Edit zone data configuration file (kgc.com.zone) [root@localhost ~] # cd / var/named/ # # switch to / var/named directory [root@localhost named] # cp-p named.localhost kgc.com.zone # # copy template for kgc.com.zone [root@localhost named] # vim kgc.com.zone # # Edit zone data configuration file [root@localhost named] # systemctl start named # # enable dns server Do $TTL 1D @ IN SOA @ rname.invalid. (0; serial 1D; refresh 1H Retry 1W; expire 3H) Minimum NS @ A 127.0.0.1www IN A 192.168.13.132 # # Delete ipv6, add domain name resolution address to native 5, configure http master configuration file, modify listening port And restart the network service [root@localhost html] # vim / etc/httpd/conf/httpd.conf # # modify the configuration file Listen 192.168.13.132 etc/httpd/conf/httpd.conf 80 # # modify ipv4 listening port # Listen 80 # # annotate the ipv6 port ServerName www.kgc.com:80 # # modify the domain name [root@localhost named] # systemctl stop firewalld.service # # turn off the firewall [root@localhost named] # Setenforce 0 # # turn off the enhancements [root@localhost html] # systemctl start httpd.service # # start network services 6 Use the test machine (dns service address 192.168.13.132) to access the test website
7. View your log file [root@localhost html] # cd / var/log/httpd/ # # switch to your log file [root@localhost httpd] # cat access_log # # View the log file
8Jing Windows file sharing, using Linux to remotely mount and install AWStats1) share the compression package needed by LAMP on Windows (if you have any questions here, please see the previous blog related article)
2) use remote sharing on Linux to obtain files and mount them to the / abc directory [root@localhost httpd] # mkdir / abc # # create a mount point / abcroot@lamp ~] # smbclient-L / / 192.168.10.88 / Sharename Type Comment-LAMP-C7 Disk [root@lamp ~] # mount.cifs / / 192.168.10.88/LAMP-C7 / abc # # remotely mount the software package to the / abc directory 3) extract the source code package to the / opt directory [root@localhost httpd] # cd / abc # # switch to the mount point [root@localhost abc] # tar zxvf awstats-7.6.tar.gz-C / opt # # decompress to / opt4) configure AWStats [root@localhost abc] # cd / opt/ # # switching / opt directory [root@localhost opt] # lsawstats-7.6 rh [root@localhost opt] # mv awstats-7.6/ / usr/local/awstats # # Mobile awstats to / usr/local/awstats [root@localhost opt] # cd / usr/local/ # # switch to this directory [root@localhost local] # lsawstats bin etc games include lib lib64 libexec sbin share src [root@localhost local] # cd awstats/ # # switch to [root@localhost] under awstats directory Awstats] # lsdocs README.md tools wwwroot [root@localhost awstats] # cd tools/ # # switch to [root@localhost tools] #. / awstats_configure.pl # # start configuration # # the following is the configuration information Enter full config file path of your Web server.Example: / etc/httpd/httpd.confExample: / usr/local/apache2/conf/httpd.confExample: C:\ Program files\ apache group\ apache\ conf\ httpd.confConfig file Path ('none' to skip web server setup): > / etc/httpd/conf/httpd.conf # # fill in the profile path Do you want me to build a new AWStats config/profilefile (required if first install) [yUnip N]? Y # # confirm to create a new configuration file What is the name of your web site or profile analysis? Example: www.mysite.comExample: demoYour web site Virtual server or profile name: > www.kgc.com # # enter your domain name In which directory do you plan to store your config file (s)? Default: / etc/awstatsDirectory path to store config file (s) (Enter for default): > # # enter the directory of configuration files corresponding to the default domain name > http://localhost/awstats/awstats.pl?config=www.kgc.com## this page is the URL we want to visit Press ENTER to finish...9 Configure the http main configuration file [root@localhost tools] # cd / etc/httpd/conf [root@localhost conf] # vim httpd.conf # # Big G to the last line Options None AllowOverride None# Order allow,deny # # comment these two permission settings # Allow from allRequire all granted # # add allow all 10 Configure the default awstats configuration file [root@localhost conf] # cd / etc/awstats/ [root@localhost awstats] # lsawstats.www.kgc.com.conf [root@localhost awstats] # vim awstats.www.kgc.com.conf # # modify configuration LogFile= "/ var/log/httpd/access_log" # # modify to access_log log file DirData= "/ var/lib/awstats" # # data save directory [root@localhost awstats] # cd / var/ Lib/ [root@localhost lib] # mkdir awstats # # create a data storage directory [root@localhost lib] # systemctl restart httpd.service # # restart the website service 11 Go to the awstats Log Analysis system page (change local host to www.kgc.com)
12. Conduct data collection and re-check your log analysis system page
[root@localhost ~] # cd / usr/local/awstats/tools
[root@localhost tools] #. / awstats_updateall.pl now
13. Optimize update data, optimize web address [root@localhost tools] # crontab-e # # create periodic scheduled tasks * / 5 * / usr/local/awstats/tools/awstats_updataall.pl now # # refresh every five minutes [root@localhost tools] # cd / var/www/html # # switch to site [root@localhost html] # vim aws.html # # optimize web address
At this time, the awstats log analysis system has been built. thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 236
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.