yum -y install httpd php php-mysql mariadb-server php-gd
systemctl start httpd.service
systemctl start mariadb.service
systemctl start mariadb
mysql
MariaDB [(none)]> GRANT ALL ON Syslog.* TO ‘loguser‘@‘127.0.0.1‘ IDENTIFIED BY ‘centos‘;
MariaDB [(none)]> GRANT ALL ON Syslog.* TO ‘loguser‘@‘local‘ IDENTIFIED BY ‘centos‘;
yum install rsyslog-mysql
rpm -ql rsyslog-mysql
mysql -uloguser -h127.0.0.1 -pcentos < /usr/share/doc/rsyslog-8.24.0/mysql-createDB.sql
vim /etc/rsyslog.conf
#### MODULES ####
......
$ModLoad imudp #加载udp的模块
$UDPServerRun 514 #允许接收udp 514的端口传来的日志
$ModLoad imtcp #加载tcp的模块
vim /etc/rsyslog.conf
#### RULES ####
*.* :ommysql:127.0.0.1,Syslog,loguser,centos
systemctl restart rsyslog.service
vim /etc/rsyslog.conf
#### RULES ####
*.* @192.168.117.170
service rsyslog restart
tar xf loganalyzer-4.1.6.tar.gz
cd loganalyzer-4.1.6
cp -a src /var/www/html/loganalyzer-4.1.6
cd /var/www/html
ln -sv loganalyzer-4.1.6 log
cd log
touch config.php
chmod 666 config.php
http://192.168.117.178/log/
原文地址:http://blog.51cto.com/12105235/2113131