Build and use centralized management of logs
Experimental objectives:
Build and use centralized management of logs
Introduction:
Red font is the focus, the firewall must be turned off, otherwise it will affect the error report of the experiment.
Colored fonts are annotated and easy to understand
The steps of the experiment:
Actions in client A:
[root@localhost~] # iptables-F / / first turn off the firewall
[root@localhost ~] # serviceiptables save / / Save the settings to turn off the firewall
[root@localhost ~] # vim/etc/syslog.conf / / set the location of the cron log in the syslog.conf file to @ 192.168.1.1 (this address is the server address) as shown below: as the picture cannot be displayed, please see attachment syslog.conf
[root@localhost ~] # service syslogrestart / / restart the syslog service to make syslog.conf effective
Configuration of server A:
[root@localhost~] # iptables-F / / first of all, turn off the firewall
[root@localhost ~] # service iptablessave / / Save firewall settings
[root@localhost ~] # vim/etc/sysconfig/syslog / / change the configuration of the syslog of the receiving log host, as shown in the following figure, add-r to the cursor to OK. Save exit / / the picture cannot be displayed here. View attachment syslog.
[root@localhost ~] # tail-f/var/log/cron / / Open message reception and wait
Let's go to client A trigger time cron:
The operations on the client are as follows:
[root@localhost~] # crontab-e / / you can see the following prompt on server A: the experiment is successful ~ ~
Experimental summary: although the experiment is not big, it is a good beginning for us to understand the enterprise environment.
Pure hand fight!
Attachment: http://down.51cto.com/data/2365586