rsyslog如何在linux系统安装,rsyslog安装配置

1,准备

master:10.1.5.241

slave01:10.1.5.242

在服务器端和客户端分别安装rsyslog

[root@master ~]# yum -y rsyslog

[root@master ~]# rsyslogd -version

rsyslogd 5.8.10, compiled with:

FEATURE_REGEXP:                Yes

FEATURE_LARGEFILE:            No

GSSAPI Kerberos 5 support:        Yes

FEATURE_DEBUG (debug build, slow code):    No

32bit Atomic operations supported:    Yes

64bit Atomic operations supported:    Yes

Runtime Instrumentation (slow code):    No

See http://www.rsyslog.com for more information.

2,配置

配置文件如下:

[root@master ~]# egrep -v '^#|^$' /etc/rsyslog.conf

$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

$ModLoad imudp                            打开ucp连接,通过ucp传日志

$UDPServerRun 514

$ModLoad imtcp                                        打开tcp连接,通过tcp传日志

$InputTCPServerRun 10514

$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat

$IncludeConfig /etc/rsyslog.d/*.conf

*.info;mail.none;authpriv.none;cron.none                /var/log/messages

authpriv.*                                              /var/log/secure

mail.*                                                  -/var/log/maillog

cron.*              

你可能感兴趣的:(rsyslog如何在linux系统安装,rsyslog安装配置)