1.1 http mysql php的安装

yum -y install httpd mysql* php*
chkconfig httpd on
chkconfig mysqld on
1.1.1 mysql用户创建
mysqladmin -u root password  xxxxx
1.1.2 rsyslog是否安装
rpm -qa|grep rsyslog
1.1.3 创建数据库
yum install rsyslog-mysql*
cd /usr/share/doc/rsyslog-mysql-5.8.10/
mysql -uroot -pxxxxxx < createDB.sql
grant all on Syslog.* to rsyslog@localhost identified by ‘rsyslog’;
flush privileges;
1.1.4 rsyslog配置
# vi /etc/rsyslog.conf
$ModLoad ommysql
*.* :o mmysql:localhost,Syslog,rsyslog,123456
在 #### MODULES #### 下添加上面两行。
$ModLoad immark    #immark是模块名,支持日志标记
$ModLoad imudp    #imupd是模块名,支持udp协议
$UDPServerRun 514    #允许514端口接收使用UDP和TCP协议转发过来的日志
#### MODULES ####
$ModLoad imuxsock # provides support for local system logging (e.g. via logger command)
$ModLoad imklog   # provides kernel logging support (previously done by rklogd)
$ModLoad immark  # provides –MARK– message capability
# Provides UDP syslog reception
$ModLoad imudp
$UDPServerRun 514
# Provides TCP syslog reception
$ModLoad imtcp
$InputTCPServerRun 514
1.2 loganalyzer的安装
# mkdir -p /var/www/html/loganalyzer
# rsync -a src/* /var/www/html/loganalyzer/
# touch /var/www/html/loganalyzer/config.php
# chmod 666 /var/www/html/loganalyzer/config.php