centos6.5 x86_64 installation Rsyslog + Loganalyzer

Source: Internet
Author: User
Tags snmp syslog ioncube rsyslog

Platform: CentOS 6.5 x86_64


1.vi/etc/selinux/config

Selinux=disabled

Reboot your Host

A simple method:

Sed-i ' s/selinux=enforcing/selinux=disabled/g '/etc/selinux/config

Setenforce 0


Sestatus-v View Status


2.RPM-IVH http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm


3.yum-y Install MC wget crontabs Vixie-cron make gcc Libtool-ltdl curl mysql-server mysql-devel net-snmp net-snmp-utils p HP Php-mysql php-mcrypt php-gd php-snmp php-process NTP sendmail SENDMAIL-CF Alpine Mutt


4.yum Install glibc.i686 libgcc_s.so.1


5.wget http://www.dmasoftlab.com/cont/download/ioncube_loaders_lin_x86-64.tar.gz


Tar zxvf ioncube_loaders_lin_x86-64.tar.gz

CP-RF ioncube/usr/local/


Vim/etc/php.ini

Bottom Write zend_extension=/usr/local/ioncube/ioncube_loader_lin_5.3.so

Php-v view, loading success can see PHP and Zend Egine version

Chkconfig--list httpd

Chkconfig--level httpd on

Service httpd Restart (Apache is installed by default)


6.chkconfig--list mysqld

Chkconfig--level mysqld on

Service mysqld Start

/usr/bin/mysqladmin-u root password ' Hello '

Test the PHP Runtime environment


cd/var/www/html/

Cat > Index.php <<eof

<?php

Phpinfo ();

?>

Eof


You can see the PHP information by typing Http://YOURSERVERIP in the browser.


7.1 Check if the Rsyslog software is installed

Rpm-qa|grep Rsyslog//The software is installed on the default system


7.2 Installing Rsyslog modules connected to MySQL database

Yum Install Rsyslog-mysql–y

Rsyslog-mysql a module for Rsyslog to send logs to the MySQL database, which must be installed.



8. Import the Rsyslog-mysql database file

cd/usr/share/doc/rsyslog-mysql-5.8.10/

Mysql-uroot-phello < Createdb.sql


/usr/bin/mysql-u root-p Enter Password Hello


Grant all on syslog.* to rsyslog@localhost identified by ' 123456 ';

Flush privileges;


9. Turn on the relevant log module


Vi/etc/rsyslog.conf

$ModLoad Immark #immark是模块名, support log tagging

$ModLoad imudp #imupd是模块名, support UDP protocol

$UDPServerRun 514 #允许514端口接收使用UDP和TCP协议转发过来的日志


Add two lines immediately

$ModLoad Ommysql

*. *: ommysql:localhost,syslog,rsyslog,123456


Service Rsyslog Restart


Installing Loganalyzer

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

Tar zxvf loganalyzer-3.6.6.tar.gz

CD loganalyzer-3.6.6

Mkdir-p/var/www/html/loganalyzer/

Rsync-a src/*/var/www/html/loganalyzer/

cd/var/www/html/loganalyzer/


Touch config.php

chmod 666 config.php



10. Configure the Client


1 Check if Rsyslog is installed

Rpm-qa|grep Rsyslog


2 Configuring the Rsyslog client to send local logs to the server


Vi/etc/rsyslog.conf

* * @102.108.8.27

At the end of the line, the above line is added, that is, the client sends the local log to the server.


3 Restart Rsyslog Service

Service Rsyslog Restart



In the browser input Http://YOURSERVERIP/loganalyzer

Follow the instructions, altogether eight steps.

WARNING: Note The database table is case-sensitive. For example, the table name should be written as SystemEvents, database name syslog, user name Rsyslog, password: 123456.


centos6.5 x86_64 installation Rsyslog + Loganalyzer

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.