installation program and component system for centos6.6# yum install httpd php php-mysql php-gd mysql mysql-server rsyslog-mysql
Second, prepare the relevant configuration and test the environment
1. Start Http,mysql service# service Mysqld Start
# Chkconfig Mysqld on
# service httpd Start
# Chkconfig httpd on
# vim/var/www/html/index.php
2. Create a database, new user and authorize
# RPM-QLRsyslog-mysql= = View the file acquisition generated by the installationCreatedb.sql location MySQL </usr/share/doc/rsyslog-mysql-5.8.10/createdb.sql==> Creating a Rsyslog database and tables
Mysql> Grant all on syslog.* to [e-mail protected] identified by ' Slpass ';==> new account and authorize
Mysql> Grant all on syslog.* to [e-mail protected] identified by ' Slpass ';
mysql> flush Privileges;
Third, configuration Rsyslog
1, vim/etc/rsyslog.conf
2. Modules # # # # # # # #启用模块:$ModLoad Ommysql ==> add in config file
3, in # # # #rules # # # #段中定义记录日志信息于数据库中Facility.priority:ommysql:server_ip,database,username,password*.info;mail.none;authpriv.none;cron.none:ommysql : 127.0.0.1,syslog,sl,slpass ==> in configuration file modification # service Rsyslog restart# yum-y Reinstall zsh
Four, installationLoganalyzer (loganalyzer-3.6.5)# Tar XF loganalyzer-3.6.5# cp/var/www/html/loganalyzer-3.6.5/contrib/*/var/www/html//
# CD /var/www/html/# chmod +x configure.sh secure.sh#/configure.sh#./secure.sh# chmod 666 config.php# chown-r apache.apache./*
Rsyslog logs stored in MySQL