CentOS 6.5 웹로그 모니터링 awstats 설치하기

  • lililiillililiil
  • 2014.04.29 16:30:36
  • 1
1. awstats 설치

# yum install awstats
* 패키지가 없을경우 epel repo 를 추가합니다.

2. conf 파일 수정하기

# vi /etc/awstats/awstats.세팅할도메인주소.conf
Lang="ko"
LogFile="/var/log/httpd/access_log" // 로그파일 주소가 다를경우 거기에 맞게 수정

3. crontab 에 스케쥴러 추가

# crontab -e
*/5     *       *       *       *       /usr/share/awstats/tools/awstats_updateall.pl now -confdir="/etc" -awstatsprog="/var/www/awstats/awstats.pl"

4. 아이피의 국가별 구문을 위해 geoip 설정

# yum install geoip perl-Geo-IP
# mkdir /usr/local/geo
# cd /usr/local/geo
# wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
# wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
# gzip -d GeoIP.dat.gz
# gzip -d GeoLiteCity.dat.gz
# vi /etc/awstats/awstats.도메인.conf

LoadPlugin="geoip GEOIP_STANDARD /usr/share/GeoIP/GeoIP.dat"
LoadPlugin="geoip_city_maxmind GEOIP_STANDARD /usr/local/geo/GeoIPCity.dat"

/usr/share/awstats/tools/awstats_updateall.pl now -confdir="/etc" -awstatsprog="/var/www/awstats/awstats.pl"

5. 아파치 설정파일 수정

# vi /etc/httpd/conf.d/awstats.conf
Allow from 127.0.0.1 을 Allow from All 로 수정

6. 접속

http://도메인/awstats/awstats.pl

태그목록

  • 없음

첨부파일 목록

  • 없음
목록으로 돌아가기
댓글 쓰기
댓글 목록 [1]
  • dummy72

    3.번  : cron.hourly에 자동 등록 됩니다. 확인만 해보시면 됩니다.

    4번 : GeoIPCity.dat -> GeoLiteCity.dat

     

    이대로 설정하니 아주 쉽게 되네요

    댓글 2015-05-29