First, install and set the lamp environment
yum-y Install httpd mysql* php*
Second, installation Rsyslog
Server-side:
Yum Install Rsyslog Rsyslog-mysql
Rsyslog-mysql: Transferring logs to the MySQL database
mysql-uroot-p1234 </usr/share/doc/rsyslog-mysql-5.8.10/createdb.sql
Configure Data permissions
# Mysql-uroot–p
Mysql> Grant all on syslog.* to [e-mail protected] identified by ' Syslog ';
mysql> flush Privileges;
Mysql> exit
Modifying a configuration file
More/etc/rsyslog.conf
# # # # MODULES # #
$ModLoad Imuxsock # provides support for local system logging (e.g. via Logger command)
$ModLoad Imklog # provides kernel logging support (previously do by RKLOGD)
$ModLoad Immark # provides--mark--message capability
# # #Mysql # # #
$ModLoad ommysql.so
*. *: Ommysql:localhost,syslog,syslog,syslog
# provides UDP syslog reception
$ModLoad IMUDP
$UDPServerRun 514
#Log file dynamic production log files
$template logfile, "/data/rsyslog/%fromhost-ip%_% $year percent $month $day%.log"
*. logfile
Restart Rsyslog
Service Rsyslog Restart
Client:
# yum Install Rsyslog-y
Configuring the Rsyslog client to send local logs to the server
# vi/etc/rsyslog.conf
The last line adds the following:
-------------------
*. * @rsyslog Server IP
Restart Rsyslog
Service Rsyslog Restart
III. Installation and Deployment Loganalyzer
# wget http://download.adiscon.com/loganalyzer/loganalyzer-3.6.5.tar.gz
# tar zxf loganalyzer-3.6.5.tar.gz
# CD loganalyzer-3.6.5
# mkdir-p/data/www/loganalyzer
Copy loganalyzer source code to Apache DocumentRoot under Loganalyzer directory
# cp-r src/*/data/www/loganalyzer
# cp-r contrib/*/data/www/loganalyzer
Before installing Loganalyzer through the Web Wizard, you must first execute the following two scripts
# cd/data/www/loganalyzer/
# sh configure.sh
# sh secure.sh
#chown-R Apache. Apache/data/www/loganalyzer
Web-side configuration
Http://IP/loganalyzer
Slightly
Deploying log servers under CentOS using Rsyslog+loganalyzer+mysql