Analysis of log server configuration cases on RHEL4
Source: Internet
Author: User
Analysis of the log server configuration case on RHEL4-Linux Enterprise Application-Linux server application information. The following is a detailed description. 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)
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