Rsyslog logs stored in MySQL

Source: Internet
Author: User
Tags chmod syslog rsyslog

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.