»
遊客:
註冊
|
登錄
|
統計
|
幫助
HGIGA Service Docs
»
其它
» [CentOS版本]如何集中MailLog到一台主機上
上一主題
下一主題
標題: [CentOS版本]如何集中MailLog到一台主機上
service.support
UID 14
精華 0
積分 0
帖子 523
閱讀權限 200
註冊 2006-10-2
狀態 離線
[CentOS版本]如何集中MailLog到一台主機上
http://taiwanwolf.blogspot.tw/2011/08/centos-6-rsyslogd-log.html
新版 CentOS 6 改用 rsyslog 取代 syslogd,所以用法也不同
[Server端設定方式]
Server 端開啟方式如下
1. vim /etc/rsyslog.conf
2. 將此兩行的註解 # 取消
#$ModLoad imudp.so
#UDPServerRun 514
3. 存檔離開
4. /etc/init.d/rsyslog restart
5. netstat -ntulp | grep 514
vi /etc/rsyslog.conf
# rsyslog v5 configuration file
# For more information see /usr/share/doc/rsyslog-*/rsyslog_conf.html
# If you experience problems, see
http://www.rsyslog.com/doc/troubleshoot.html
#### MODULES ####
$ModLoad imuxsock # provides support for local system logging (e.g. via logger command)
$ModLoad imklog # provides kernel logging support (previously done by rklogd)
#$ModLoad immark # provides --MARK-- message capability
# Provides UDP syslog reception
$ModLoad imudp
$UDPServerRun 514
# Provides TCP syslog reception
#$ModLoad imtcp
#$InputTCPServerRun 514
[Client端設定方式]
同場加映 Client 設定方法
1. vim /etc/rsyslog.conf , 移到最下面
2. 新增 *.* @你的Log server IP:514
3. 存檔
4. /etc/init.d/rsyslog restart
Ex: 假設 Log Server為 192.168.1.1
vi /etc/rsyslog.conf
# rsyslog v5 configuration file
# For more information see /usr/share/doc/rsyslog-*/rsyslog_conf.html
# If you experience problems, see
http://www.rsyslog.com/doc/troubleshoot.html
#### MODULES ####
$ModLoad imuxsock # provides support for local system logging (e.g. via logger command)
$ModLoad imklog # provides kernel logging support (previously done by rklogd)
#$ModLoad immark # provides --MARK-- message capability
# Provides UDP syslog reception
$ModLoad imudp
$UDPServerRun 514
# Provides TCP syslog reception
#$ModLoad imtcp
#$InputTCPServerRun 514
#### GLOBAL DIRECTIVES ####
# Use default timestamp format
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
# File syncing capability is disabled by default. This feature is usually not required,
# not useful and an extreme performance hit
#$ActionFileEnableSync on
# Include all config files in /etc/rsyslog.d/
$IncludeConfig /etc/rsyslog.d/*.conf
#### RULES ####
# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.* /dev/console
# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;authpriv.none;cron.none /var/log/messages
# The authpriv file has restricted access.
authpriv.* /var/log/secure
# Log all the mail messages in one place.
mail.* -/var/log/maillog
mail.* @192.168.1.1:514
2014-3-26 14:13
#1
可打印版本
|
推薦給朋友
|
訂閱主題
|
收藏主題
論壇跳轉 ...
公告
> 瀏覽本論壇時, 先閱讀此處說明
> PS韌體與RPM/ISO下載位置
公司產品技術文件
> 桓基產品之安裝文件
> PowerFamily
> PowerStation
> [舊版已停產]PowerWall
> PowerDAC
> PowerCluster
> [已停產]PowerLog
> PowerWAF
> [舊版已停產]PowerReport
> 舊版/重複/過期文件區
> iSherlock
> iSherlock
> [已停產]ImageSherlock
> 舊版/重複文件區
> CCMail(EIP)
> CCMAILQ(CentOS6)
> CCMAILR(CentOS7/RedHat8)
> CCMAILK(RedHat8)
> [舊版已停產]CCMAILO (Outlook_Like)
> [舊版已停產]CCMAILN (NEW)
> [舊版已停產]Mobile CCMAIL
> OAKlouds
> 其它(含代理產品)
> 雲端硬碟
> eFlow差勤系統
> [已停產]TeraMedia
> SMS2WAY
> [舊版已停產]PacketShow
> Sophos Anti-Viuse
> eLearning 相關教材
> Power系列
> Sherlock系列
> 工程師教育訓練
產品問題討論
> PowerFamily Q/A
> iSherlock Q/A
> CCMail(EIP) Q/A
> OAKlouds Q/A
> 其它
> 雲端硬碟 Q/A
> SMS2WAY
> TeraMedia Q/A
> Sophos
> PacketShow
工程師教育訓練
> 基本常識
> 中級課程
> 進階課程
> 常見工具
Powered by
Discuz!
4.1.0
© 2001-2006 Transformed by
wxxslt
for
HGIGA Inc. / Service Support
Processed in 0.014708 second(s), 6 queries , Gzip enabled
界面風格
----------
默認風格
Speed
Green
Molyx_Cfwx
清除 Cookies
-
聯繫我們
-
HGIGA Inc. / Service Support
-
Archiver
-
WAP
所有時間為 GMT+8, 現在時間是 2024-11-1 09:04