码迷,mamicode.com
首页 > 其他好文 > 详细

centos rsyslog集中日志服务器

时间:2015-02-11 19:00:48      阅读:137      评论:0      收藏:0      [点我收藏+]

标签:software for linux

1、安装rsyslog及rsyslog-mysql
yum -y install rsyslog-mysql
2、导入数据库并创建数据库账号密码
find /usr |grep createDB.sql
mysql -u root -p < /usr/share/doc/rsyslog-mysql-5.8.10/createDB.sql
show databases;
grant all privileges on Syslog.* to syslog@‘localhost‘ identified by ‘syslog123‘;
flush privileges;

3、配置rsyslog.conf
module地方放开如下:
$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
新增加:
$ModLoad ommysql.so
*.* :ommysql:localhost,Syslog,syslog,syslog123
数据库地址/库名/数据库用户名/数据库密码

 tar -xzvf loganalyzer-3.6.6.tar.gz
 mkdir /var/www/html/loganalyzer
cp -r src/* /var/www/html/loganalyzer
cp -r contrib/* /var/www/html/loganalyzer
chown -R syslog.syslog /var/www/html/loganalyzer
cd /var/www/html/loganalyzer/
sh configure.sh
sh secure.sh
chmod 666 config.php

本文出自 “说逍遥不逍遥” 博客,请务必保留此出处http://maorui2005.blog.51cto.com/863709/1613679

centos rsyslog集中日志服务器

标签:software for linux

原文地址:http://maorui2005.blog.51cto.com/863709/1613679

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!