First, the installation of the service side
Yum source New, if any, you can omit
# cat >>/etc/yum.repos.d/sohu.repo <<eof
[Sohu]
Name=sohu ' s mirrors
baseurl=http:// mirrors.sohu.com/centos/5/os/x86_64/
enabled=1
gpgcheck=0
EOF
Install lamp environment and rsyslog, if have lamp, only need to install Rsyslog Rsyslog-mysql can
Yum install rsyslog rsyslog-mysql mysql mysql-devel mysql-server php php-mysql php-pdo Php-common php-gd
Import Rsyslog Database
Mysql-u Root-p < $ (RPM-QL rsyslog-mysql | grep sql$)
Create a database user
Mysql-u root-p
mysql> Grant all privileges on syslog.* to logger@localhost identified by ' logger ';
mysql> flush Privileges;
Mysql> exit;
Modifying the Rsyslog configuration file
# vi/etc/rsyslog.conf//Modify it can be # Use traditional timestamp format $ActionFileDefaultTemplate Rsyslog_traditionalfi Leformat # provides kernel logging support (previously do by RKLOGD) # provides to Local system support (e.g. via logger command) $ModLoad immark $ModLoad imuxsock $ModLoad imklog $ModLoad ommysql *.*: ommysql:127.
0.0.1,syslog,logger,logger $ModLoad imudp.so $UDPServerRun 514 # Log All kernel messages to the console.
# Logging Much else clutters up the screen. #kern. */dev/console # Log anything (except mail) of level info or higher
.
# Don ' t log private authentication messages!
*.info;mail.none;authpriv.none;cron.none/var/log/messages # The Authpriv file has restricted access.
authpriv.*/var/log/secure # Log all of the mail messages in one place. Mail.*-/var/Log/maillog # Log Cron Stuff cron.*/var/log/cron # everybody GE TS Emergency Messages *.emerg * # Save News errors of level crit and HIG
Her in a special file. Uucp,news.crit/var/log/spooler # Save Boot messages also to Boot.log Loc al7.*/var/log/boot.log
The red part is added, the other contrast, some skip, not the add it.
Install Loganalyzer
# wget http://download.adiscon.com/loganalyzer/loganalyzer-3.6.3.tar.gz
# tar XF loganalyzer-3.6.3.tar.gz
# Mkdir/var/www/html/loganalyzer
# mv loganalyzer-3.6.3/src/*/var/www/html/loganalyze
# touch/var/www/html/ loganalyzer/config.php
# chmod 666/var/www/html/loganalyzer/config.php
You can install it through a browser