Log Server Configuration on RHEL

Source: Internet
Author: User
Prerequisites: 1) log server machine name: logserver, ip: 192.168.1.1172) log client machine name: logclientX (X indicates any machine), ip: 192.168.1.2 (1) Configure log client 1) use a local file to explain the server name; echo "192.168.1.117logserver" & gt;/etc/hosts2) to modify the configuration log configuration file; echo "*. * @ logserver prerequisites:
1) log server machine name: logserver, ip: 192.168.1.117

2) log client machine name: logclientX (X indicates any machine), ip Address: 192.168.1.2

1) configure the log Client

1) use a local file to explain the server name;

Echo "192.168.1.117 logserver">/etc/hosts

2) modify the configuration log configuration file;

Echo "*. * @ logserver">/etc/syslog. conf

Note: All logs on the machine are forwarded to the remote logserver log server;

3) restart the syslog service;

Service syslog restart

4) check whether the port is enabled;

[Root @ test ~] # Netstat-tunl | grep 514

Udp 0 0 0.0.0.0: 514 0.0.0.0 :*

2) configure the log server

1) modify the log configuration parameter file/etc/sysconfig/syslog;

SYSLOGD_OPTIONS = "-r-m 0"

Note: by default, the-r parameter does not exist;

2) restart the syslog service;

Service syslog restart

3) check whether the port is enabled;

[Root @ test ~] # Netstat-tunl | grep 514

Udp 0 0 0.0.0.0: 514 0.0.0.0 :*

3) test

1) log on to/out of logclientX)

Su-Oracle

2) view logs on logserver

[Root @ test ~] # Tail-f/var/log/messages

Apr 4 16:01:28 192.168.1.2 su (pam_unix) [4651]: session opened for user oracle by root (uid = 0)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.