logwatch 시스템 로그 메일로 받기 (메일 주소 변경) > server

본문 바로가기
사이트 내 전체검색

server

logwatch 시스템 로그 메일로 받기 (메일 주소 변경)

페이지 정보

작성자 서방님 댓글 0건 조회 168회 작성일 14-02-19 09:33

본문

logwatch 시스템 로그 메일로 받기

1. logwatch 설치 확인
[root@byungun ~]# rpm -qa | grep logwatch
logwatch-7.3-8.el5

2. logwatch 설치
[root@byungun ~]# yum install logwatch

3. logwatch 설정 파일
/usr/share/logwatch/default.conf/logwatch.conf : 설정 파일
/etc/cron.daily/0logwatch : 크론(하루에 한 번 구동)

4. 메일주소 변경(받는 메일)
[root@byungun ~]# vi /usr/share/logwatch/default.conf/logwatch.conf
---------------------------------------------------------------------
# Default Log Directory
# All log-files are assumed to be given relative to this directory.
LogDir = /var/log

# You can override the default temp directory (/tmp) here
TmpDir = /var/cache/logwatch

# Default person to mail reports to.  Can be a local account or a
# complete email address.
#MailTo = root
MailTo = webmaster@seobangnim.xinour.net, test@domain.com # 2개의 메일로 발송

# Default person to mail reports from.  Can be a local account or a
# complete email address.
MailFrom = Logwatch
---------------------------------------------------------------------

5. 보내는 메일 도메인 변경
[root@byungun ~]# vi /etc/hosts
---------------------------------------------------------------------
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               byungun byungun.secdns.co.kr localhost
#127.0.0.1              byungun localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6
---------------------------------------------------------------------

6. 메일 보내기(메일 테스트)
[root@byungun cron.daily]# cd /etc/cron.daily
[root@byungun cron.daily]# ./0logwatch

댓글목록

등록된 댓글이 없습니다.

Total 356건 13 페이지
게시물 검색

회원로그인

접속자집계

오늘
134
어제
225
최대
1,347
전체
154,893
Latest Crypto Fear & Greed Index

그누보드5
Copyright © 서방님.kr All rights reserved.