Experiment name: Configure log server experimenter HJSM Date 2020-11-19
Experiment purpose: Configure log server database log client dynamic upload server
Experimental topology:
Experimental environment: Operating system: Centos 7 two sets of
experimental equipment: Centos 7
experimental steps:
1. Configure the log server
Build LAMP on the log server
2. Set up the test page and test
[root@localhost html]# cd /var/www/html
[root@localhost html]# vim test.php
t@localhost html]# firefox http://127.0.0.1/test.php
3. Configure the log server database.
4. Configure the main configuration file of the server rsyslogd
[root@localhost rsyslog-8.24.0]# cd
[root@localhost ~]# vim /etc/rsyslog.conf
[root@localhost ~]# systemctl restart rsyslog.service
[root@localhost ~]# setenforce 0
5. Configure the log client
[root@localhost ~]# vim /etc/rsyslog.conf
[root@localhost ~]# systemctl restart rsyslog.service
6. Edit /etc/bashrc, write all commands executed by the client to the system log /var/log/messages, and add at the end of the document
[root@localhost ~]# vim /etc/bashrc
[root@localhost ~]# source /etc/bashrc
client use command
7Server monitoring log real-time information
[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# tailf /var/log/messages