Deploying log servers under CentOS using Rsyslog+loganalyzer+mysql

Source: Internet
Author: User
Tags syslog rsyslog

First, install and set the lamp environment

yum-y Install httpd mysql* php*

Second, installation Rsyslog

Server-side:

Yum Install Rsyslog Rsyslog-mysql

Rsyslog-mysql: Transferring logs to the MySQL database

mysql-uroot-p1234 </usr/share/doc/rsyslog-mysql-5.8.10/createdb.sql

Configure Data permissions

# Mysql-uroot–p

Mysql> Grant all on syslog.* to [e-mail protected] identified by ' Syslog ';

mysql> flush Privileges;

Mysql> exit

Modifying a configuration file

More/etc/rsyslog.conf

# # # # MODULES # #


$ModLoad Imuxsock # provides support for local system logging (e.g. via Logger command)

$ModLoad Imklog # provides kernel logging support (previously do by RKLOGD)

$ModLoad Immark # provides--mark--message capability

# # #Mysql # # #

$ModLoad ommysql.so

*. *: Ommysql:localhost,syslog,syslog,syslog


# provides UDP syslog reception

$ModLoad IMUDP

$UDPServerRun 514

#Log file dynamic production log files

$template logfile, "/data/rsyslog/%fromhost-ip%_% $year percent $month $day%.log"

*. logfile

Restart Rsyslog

Service Rsyslog Restart

Client:

# yum Install Rsyslog-y

Configuring the Rsyslog client to send local logs to the server

# vi/etc/rsyslog.conf

The last line adds the following:

-------------------

*. * @rsyslog Server IP

Restart Rsyslog

Service Rsyslog Restart

III. Installation and Deployment Loganalyzer

# wget http://download.adiscon.com/loganalyzer/loganalyzer-3.6.5.tar.gz

# tar zxf loganalyzer-3.6.5.tar.gz

# CD loganalyzer-3.6.5

# mkdir-p/data/www/loganalyzer

Copy loganalyzer source code to Apache DocumentRoot under Loganalyzer directory

# cp-r src/*/data/www/loganalyzer

# cp-r contrib/*/data/www/loganalyzer

Before installing Loganalyzer through the Web Wizard, you must first execute the following two scripts

# cd/data/www/loganalyzer/

# sh configure.sh

# sh secure.sh

#chown-R Apache. Apache/data/www/loganalyzer

Web-side configuration

Http://IP/loganalyzer

Slightly

Deploying log servers under CentOS using Rsyslog+loganalyzer+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.