= AWSTATS ¼³Ä¡Çϱâ = ---- '''Author(s):''' ¹æâÇö "(ÁÖ)»ïÁ¤µ¥ÀÌÅͼ­ºñ½º¿¬±¸¼Ò" '''Date:''' 2006³â2¿ù9ÀÏ 13½Ã42ºÐ [mailto:winchild@sds.co.kr] == ÇÊ¿äÇÑÆÄÀÏ == awstats-6.5.tar.gz ÀÔ¼öó http://awstats.sourceforge.net == ¼³Ä¡ == ¼³Ä¡µð·ºÅ丮´Â WEB access °¡ °¡´ÉÇÑ°÷ ÀÌ¸é ¾îµð³ª °¡´ÉÇϳª ¿©·¯ µµ¸ÞÀÎÀÇ Åë°è󸮸¦ À§Çؼ­ apache ÀÇ DocumentRoot µð·ºÅ丮¿¡ ¼³Ä¡ÇÑ´Ù. ´ë°³ÀÇ °æ¿ì ¼­ºñ½º ÇÏ´Â µµ¸ÞÀÎÀº ¸ðµÎ °¡»ó È£½ºÆ®À» ÅëÇÑ Á¢±ÙÀÌ µÇµµ·Ï ÇÑ´Ù. ÇÊ¿äÇÑ ÆÄÀÏÀÌ ÀÖ´Â °÷Àº º¸Åë /home/archives ·Î ÀáÁ¤ÀûÀ¸·Î ÁöÁ¤ÇÑ´Ù. {{{ # cd /usr/local/apache2/htdocs # tar xvzf /home/archives/awstats-6.5.tar.gz }}} == ¼³Ä¡¹®¼­ == awststs-6.5 ¸¦ ¼­ºñ½º°¡ °¡´ÉÇÑ °¡»óÈ£½ºÆ® ¹ØÀ¸·Î LINK ¸¦ °É¾îÁØÈÄ doc ¹®¼­¸¦ ÀÔ·ÂÇÑ´Ù. {{{ # cd <¼­ºñ½º°¡ µÇ°í ÀÖ´Â htdocs ÀÇ °æ·Î> # ln -s /usr/local/apache2/htdocs/awststs-6.5/ . }}} À¥Ã¢¿¡¼­ URL ÀÔ·Â {{{ http:///awststs-6.5/docs/ }}} == ¾ï¼¼½º ·Î±×ÀÇ º¯°æ ¹× È®ÀÎ == ¾ÆÆÄÄ¡ÀÇ access ·Î±×¸¦ common ¿¡¼­ combined ·Î º¯°æ {{{ CustomLog /yourlogpath/yourlogfile common -> CustomLog /yourlogpath/yourlogfile combined }}} == ¼³Á¤ == {{{ # perl awstats_configure.pl ----- AWStats awstats_configure 1.0 (build 1.6) (c) Laurent Destailleur ----- This tool will help you to configure AWStats to analyze statistics for one web server. You can try to use it to let it do all that is possible in AWStats setup, however following the step by step manual setup documentation (docs/index.html) is often a better idea. Above all if: - You are not an administrator user, - You want to analyze downloaded log files without web server, - You want to analyze mail or ftp log files instead of web log files, - You need to analyze load balanced servers log files, - You want to 'understand' all possible ways to use AWStats... Read the AWStats documentation (docs/index.html). -----> Running OS detected: Linux, BSD or Unix Warning: AWStats standard directory on Linux OS is '/usr/local/awstats'. If you want to use standard directory, you should first move all content of AWStats distribution from current directory: /usr/local/awstats-6.5 to standard directory: /usr/local/awstats And then, run configure.pl from this location. Do you want to continue setup from this NON standard directory [yN] ? [root@new tools]# pwd /usr/local/awstats/tools [root@new tools]# perl awstats_configure.pl ----- AWStats awstats_configure 1.0 (build 1.6) (c) Laurent Destailleur ----- This tool will help you to configure AWStats to analyze statistics for one web server. You can try to use it to let it do all that is possible in AWStats setup, however following the step by step manual setup documentation (docs/index.html) is often a better idea. Above all if: - You are not an administrator user, - You want to analyze downloaded log files without web server, - You want to analyze mail or ftp log files instead of web log files, - You need to analyze load balanced servers log files, - You want to 'understand' all possible ways to use AWStats... Read the AWStats documentation (docs/index.html). -----> Running OS detected: Linux, BSD or Unix Warning: AWStats standard directory on Linux OS is '/usr/local/awstats'. If you want to use standard directory, you should first move all content of AWStats distribution from current directory: /usr/local/awstats-6.5 to standard directory: /usr/local/awstats And then, run configure.pl from this location. Do you want to continue setup from this NON standard directory [yN] ? y -----> Check for web server install Found Web server Apache config file '/usr/local/apache2/conf/httpd.conf' -----> Check and complete web server config file '/usr/local/apache2/conf/httpd.conf' Warning: You Apache config file contains directives to write 'common' log files This means that some features can't work (os, browsers and keywords detection). Do you want me to setup Apache to write 'combined' log files [y/N] ? y Add '' directive AWStats directives added to Apache config file. -----> Update model config file '/usr/local/awstats-6.5/wwwroot/cgi-bin/awstats.model.conf' File awstats.model.conf updated. -----> Need to create a new config file ? Do you want me to build a new AWStats config/profile file (required if first install) [y/N] ? y -----> Define config file name to create What is the name of your web site or profile analysis ? Example: www.mysite.com Example: demo Your web site, virtual server or profile name: > mailnara.co.kr -----> Define config file path In which directory do you plan to store your config file(s) ? Default: /etc/awstats Directory path to store config file(s) (Enter for default): > -----> Create config file '/etc/awstats/awstats.mailnara.co.kr.conf' Config file /etc/awstats/awstats.mailnara.co.kr.conf created. -----> Restart Web server with '/sbin/service httpd restart' Shutting down httpd: httpd (pid 1860) already running -----> Add update process inside a scheduler Sorry, configure.pl does not support automatic add to cron yet. You can do it manually by adding the following command to your cron: /usr/local/awstats-6.5/wwwroot/cgi-bin/awstats.pl -update -config=mailnara.co.kr Or if you have several config files and prefer having only one command: /usr/local/awstats-6.5/tools/awstats_updateall.pl now Press ENTER to continue... A SIMPLE config file has been created: /etc/awstats/awstats.mailnara.co.kr.conf You should have a look inside to check and change manually main parameters. You can then manually update your statistics for 'mailnara.co.kr' with command: > perl awstats.pl -update -config=mailnara.co.kr You can also read your statistics for 'mailnara.co.kr' with URL: > http://localhost/awstats/awstats.pl?config=mailnara.co.kr Press ENTER to finish... [root@new tools]# ls /etc/awstats awstats.mailnara.co.kr.conf }}} == DATA »ý¼º == ¿ì¼± °á°úÆÄÀÏÀ» ÀúÀåÇÒ µð·ºÅ丮¸¦ ¸¸µç´Ù. {{{ # mkdir /var/lib/awstats }}} access ÆÄÀÏ·Î Åë°èµ¥ÀÌÅ͸¦ ½ÇÇàÇÑ´Ù, µ¥ÀÌÅÍÀÇ °¹¼ö¿¡ µû¶ó ¿À·£½Ã°£ÀÌ °É¸±¼ö ÀÖ´Ù. Âü°í ±â´Ù·Á¶ó. {{{ # perl awstats.pl -config=mailnara.co.kr -update Update for config "/etc/awstats/awstats.mailnara.co.kr.conf" With data in log file "/home/httpd/MAILNARA/logs/access_log"... Phase 1 : First bypass old records, searching new record... Searching new records from beginning of log file... Phase 2 : Now process new records (Flush history on disk after 20000 hosts)... Jumped lines in file: 0 Parsed lines in file: 975854 Found 229 dropped records, Found 0 corrupted records, Found 0 old records, Found 975625 new qualified records. # }}} °á°úµ¥ÀÌÅÍ ´©ÀûµÈ°Í È®ÀÎ {{{ # ls -l /var/lib/awstats/ total 700 -rw-r--r-- 1 root root 32136 Feb 9 12:28 awstats012006.mailnara.co.kr.txt -rw-r--r-- 1 root root 122981 Feb 9 12:29 awstats022006.mailnara.co.kr.txt }}} 012006 Àº 1¿ùÀÇ µ¥ÀÌÅÍ, 022006 Àº 2¿ùÀÇ µ¥ÀÌÅÍÀÓ. ÀÌ ÆÄÀÏÀº ·Î±×°¡ °»½ÅÇϱâÀ§Çؼ­ ½ÇÇàµÉ¶§ ÀÌÀüÀÇ µ¥ÀÌÅÍ´Â SKIP ÇÏ´Â Á¤º¸µµ °¡Áö°í ÀÖÀ½. == ½ÇÇà°á°ú È®ÀÎ == {{{ http://www.myserver.mydomain/awstats/awstats.pl?config=mailnara.co.kr }}} == Ãß°¡¼³Á¤ == configure ÆÄÀÏÀ» º¹»ç {{{ # cd /etc/awstats # cp awstats.mailnara.co.kr.conf awstats.direct.co.kr.conf }}} ÆÄÀÏÁßÀÇ log ÆÄÀÏÀÇ °æ·Î¸¦ º¯°æ. {{{ LogFile="/home/httpd/CALLDIRECT/logs/access_log" }}} DATA »ý¼º {{{ # perl awstats.pl -config=direct.co.kr -update Update for config "/etc/awstats/awstats.direct.co.kr.conf" With data in log file "/home/httpd/DIRECT/logs/access_log"... Phase 1 : First bypass old records, searching new record... Searching new records from beginning of log file... Phase 2 : Now process new records (Flush history on disk after 20000 hosts)... Jumped lines in file: 0 Parsed lines in file: 2064457 Found 196 dropped records, Found 17 corrupted records, Found 0 old records, Found 2064244 new qualified records. }}} == Å©·Ð¿¡ µî·Ï == /etc/cron.daily µð·ºÅ丮¿¡ awstats ¶ó´Â ÆÄÀÏ·Î ¾Æ·¡ÀÇ ³»¿ëÀ» »ý¼ºÇÑ´Ù. {{{ # cat /etc/awstats #!/bin/sh /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -config=mailnara.co.kr-update /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -config=direct.co.kr -update # }}} ---- '''References:''' http://awstats.sourceforge.net/docs/awstats_setup.html.