Syslog server in rhel5
Posted 12-02-2011 at 03:48 AM by pantdk
#################################################################################################
syslog server 192.168.0.120
##################################################################################################
[root@deepak ~]# mkdir /var/client/
[root@deepak ~]# vi /etc/syslog.conf
192.168.0.20
*.* /var/client/192.168.0.20.log
192.168.0.20
*.* /var/client/192.168.0.20.ker.log
[root@deepak ~]# vi /etc/rc.local
syslogd_enable="YES"
syslogd_flags="-a 192.168.0.20 -v -v"
[root@deepak ~]# service syslog restart
####################################################################################################
CLIENT SERVER CONFIGURATION
CLIENT 192.168.20
####################################################################################################
[root@pant ~]# vi /etc/syslog.conf
*.* @192.168.0.120
If a PID is returned, the server has been restarted successfully,
and client configuration may begin. If the server has not restarted,
consult the /var/log/messages log for any output.
#pgrep syslog (if syslog is running then we can see the pid if syslog not running
that will show error)
[root@pant ~]# logger "hi to all" (this is the testing purpose throght this command
we are sending the "hi to all" log to the server)
#tail -f /var/log/messages
syslog server 192.168.0.120
##################################################################################################
[root@deepak ~]# mkdir /var/client/
[root@deepak ~]# vi /etc/syslog.conf
192.168.0.20
*.* /var/client/192.168.0.20.log
192.168.0.20
*.* /var/client/192.168.0.20.ker.log
[root@deepak ~]# vi /etc/rc.local
syslogd_enable="YES"
syslogd_flags="-a 192.168.0.20 -v -v"
[root@deepak ~]# service syslog restart
####################################################################################################
CLIENT SERVER CONFIGURATION
CLIENT 192.168.20
####################################################################################################
[root@pant ~]# vi /etc/syslog.conf
*.* @192.168.0.120
If a PID is returned, the server has been restarted successfully,
and client configuration may begin. If the server has not restarted,
consult the /var/log/messages log for any output.
#pgrep syslog (if syslog is running then we can see the pid if syslog not running
that will show error)
[root@pant ~]# logger "hi to all" (this is the testing purpose throght this command
we are sending the "hi to all" log to the server)
#tail -f /var/log/messages
Total Comments 0




