Linux log server build (rsyslog+loganalyzer)

  
 

Environment: centos 5.3 x32 log server environment: nginx php mysql rsyslog rsyslog-mysql loganalyzer log client environment: rsyslog log server 192.168.0.100 log client server 192.168.0.101

one, nginx+php mysql Installation

Please check http://cqfish.blog.51cto.com/622299/393351http://cqfish.blog.51cto.com/622299/393352 Second, log server installation # yum install rsyslog rsyslog- Mysql configuration # vi /etc/rsyslog add the following lines $ModLoad immark # provides --MARK-- message capability $ModLoad ommysql *.* :ommysql:localhost,Syslog,root,pass$ModLoad imudp.so # provides UDP syslog reception $UDPServerRun 514 # start a UDP syslog server at standard port 514 Note: *.* :ommysql:localhost,Syslog,root,passlocalhost for mysql host address Syslog for mysql database root for mysql username pass for mysql user root password $UDPServerRun 514 UDP port, accept client log import database # mysql < /usr/share/doc/rsyslog-mysql-3.22.1/createDB.sql Note: createDB.sql The Syslog database is automatically created. 3. Start the rsyslog log server # /etc/init.d/syslog stop Stop the syslog log # /etc/init.d/rsyslog start Start the rsyslog log and set the rsyslog to boot #chkconfig --level 3 Syslog off Stop syslog boot # chkconfig --level 3 rsyslog on Enable rsyslog boot 4, install loganalyzer server # tar zxvf loganalyzer-3.2.1.tar.gz# cp -rf /root/loganalyzer-3.2.1/src/* /var/html/syslog Note: /var/html/syslog is the web server directory # cd /var/html/syslogCreate config.php configuration file # touch config.php# chmod 666 config.phpstart nginx# /opt/Nginx/sbin/nginx enter http://192.168.0.100 in IE for loganalyzer configuration. Prompt for the next step. Next operation Note: Note that the database table name is case-sensitive. It should be written as SystemEvents 5. Log server client installation # yum Install rsyslog# vi /etc/rsyslog add the following content *.* @192.168.0.100 Note: 192.168.0.100 is the log server IP address

Copyright © Windows knowledge All Rights Reserved