搜索

28.3. 在安装过程中记录远程系统

download PDF
默认情况下,安装进程将其生成的日志信息发送到控制台。可指定将这些信息发送到运行 syslog 服务的远程系统中。
要配置远程日志,请添加 syslog 选项。请指定日志系统的 IP 地址,并在那个系统中添加日志服务的 UDP 端口号。默认情况下,接收远程信息的 syslog 服务在端口 514 中侦听 UDP。
例如:要连接到系统 192.168.1.20 中的 syslog 服务,请在 boot: 提示符后输入以下内容:
linux syslog=192.168.1.20:514

28.3.1. 配置日志服务器

Red Hat Enterprise Linux 使用 syslogd 提供 syslog 服务。默认的 syslogd 配置拒绝来自远程系统的信息。

警告

Only enable remote syslog access on secured networks. The rsyslog configuration detailed below does not make use of any of the security measures available in rsyslog Crackers may slow or crash systems that permit access to the logging service, by sending large quantities of false log messages. In addition, hostile users may intercept or falsify messages sent to the logging service over the network.
要将 Red Hat Enterprise Linux 系统配置为接受来自网络中其他系统的日志信息,请编辑文件 /etc/rsyslog.conf。必须使用 root 特权编辑文件 /etc/rsyslog.conf。去掉以下行前面的井号取消对这些行的注释:
$ModLoad imudp.so
	$UDPServerRun 514
重启 syslogd 服务应用这些更改:
su -c '/sbin/service rsyslog restart'
提示时请输入 root 密码。

注意

By default, the syslog service listens on UDP port 514. The firewall must be configured to permit connections to this port from other systems. Choose System Administration Firewall. Select Other ports, and Add. Enter 514 in the Port(s) field, and specify udp as the Protocol.
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.