Linux logs: Rsyslog and Loganalyzer (ii)

Source: Internet
Author: User
Tags rsyslog

Last Post we analyzed the basic knowledge and configuration of Rsyslog, following we continue to improve the next blog post, the final use of Rsyslog+loganalyzer+mysql deployment log server, to achieve the WebGui display of log information.

"Experimental Environment and Topology"

System: CentOS 6.5

RSYSLOG:RSYSLOGD 5.8.10

loganalyzer:loganalyzer-3.6.5

lamp:httpd-2.4.4,mysql-5.6.10,php-5.4.13


650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6E/B6/wKioL1WDxnyS2SoIAAENOxcUTms087.jpg "title=" Log server. png "alt=" wkiol1wdxnys2soiaaenoxcutms087.jpg "/>

"Experimental Configuration"

1) Build lamp platform, initialize installation Loganalyzer;

In the previous log we have installed MySQL, so we do not repeat, now we only need to install httpd and PHP, here only for the demo configuration Log server effect, so with the Yum way to install, in the actual production environment, we can compile the installation according to need.

[[email protected] ~] #yum  install -y install httpd php php-mysql  php-gd  #安装httpd与php及相关支持模块; [[email protected] ~] #wget    #下载loganalyzer -3.6.5;[[email  protected] ~]# tar xf loganalyzer-3.6.5.tar.gz [[email protected] ~]#  cd loganalyzer-3.6.5[[email protected] loganalyzer-3.6.5]# mkdir -p /var/ www/html/loganalyzer[[email protected] loganalyzer-3.6.5]# cp -r contrib/* /var/ www/html/loganalyzer/[[email protected] loganalyzer-3.6.5]# cp -r src/*  / var/www/html/loganalyzer/[[email protected] loganalyzer-3.6.5]# cd /var/www/html/ loganalyzer/[[email protected] loganalyzer]# chmod +x configure.sh secure.sh  [[email protected] loganalyzer]# ./configure.sh [[email protected]  Loganalyzer]# ./secure.sh&nbsP [[email protected] loganalyzer]# chmod 666 config.php[[email protected]  loganalyzer]# chown -r apache.apache ./*

2) Install Loganalyzer through the wizard in the browser;

☆ 1, open the browser access http://192.168.0.111/loganalyzer/prompt No configuration file, we click here to use the wizard to configure the next step;

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6E/BF/wKiom1WESPXyHMyPAAE7d9iUsG4767.jpg "style=" float: none; "title=" 1.png "alt=" Wkiom1wespxyhmypaae7d9iusg4767.jpg "/>

☆2, check the system environment, click "Next" to enter the STEP2;

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6E/BF/wKiom1WESqrQsvoKAAL1OMVoCaw881.jpg "title=" 2. PNG "alt=" wkiom1wesqrqsvokaal1omvocaw881.jpg "/>

☆ 3, check the configuration file config.php whether there is a permission to write, before I have to run the configure.sh script generated the file and modify its permissions to 666, so here we just click "Next" to enter the STEP3; 650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6E/BF/wKiom1WES1mAPo9PAAMfU73Ab98084.jpg "title=" 3.png " alt= "Wkiom1wes1mapo9paamfu73ab98084.jpg"/>

☆ 4, the basic configuration, set up the use of MySQL and configure the database service address, port, database name, table prefix, user, password; set and click Next

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6E/BF/wKiom1WETIiC6qNaAAU5kYXwaUI269.jpg "style=" float: none; "title=" 4.png "alt=" Wkiom1wetiic6qnaaau5kyxwaui269.jpg "/>

☆5, CREATE TABLE, click "Next" to create automatically;

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6E/BF/wKiom1WETIiCAB-fAAO4JcXWkzo052.jpg "style=" float: none; "title=" 5.png "alt=" Wkiom1wetiicab-faao4jcxwkzo052.jpg "/>

☆6, check SQL configuration results;

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6E/BC/wKioL1WETjygaubDAAMlXfU-jsg949.jpg "style=" float: none; "title=" 6.png "alt=" Wkiol1wetjygaubdaamlxfu-jsg949.jpg "/>

☆7, create management users;

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6E/BC/wKioL1WETj3w2TZJAAOVY1DBz80724.jpg "style=" float: none; "title=" 7.png "alt=" Wkiol1wetj3w2tzjaaovy1dbz80724.jpg "/>

☆8, create the first log source;

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6E/CC/wKiom1WIH4GSw523AARWtaSwXdw234.jpg "title=" 8.png " alt= "Wkiom1wih4gsw523aarwtaswxdw234.jpg"/>

☆9, ok! Loganalyzer configuration completed;650) this.width=650; "Src=" http://s3.51cto.com/wyfs02/M00/6E/BC/wKioL1WEUVzAE_ Ilaalypyepkai394.jpg "title=" 9.png "alt=" wkiol1weuvzae_ilaalypyepkai394.jpg "/>

☆10, click finish! to enter the main page of Loganalyzer;

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6E/C9/wKioL1WIIeez49fqAAbx_eIhbqU802.jpg "title=" 10.png "alt=" Wkiol1wiieez49fqaabx_eihbqu802.jpg "/>

☆11, Ok!host host (ip:192.168.0.112) logs are all on the log server can be viewed, is not very convenient it;


"Supplemental Note: Statistics cannot display graphics solutions"

The normal display is as follows:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6E/C9/wKioL1WII1KgqRjTAAU5ZeSzU5g834.jpg "style=" float: none; "title=" 13.png "alt=" Wkiol1wii1kgqrjtaau5zeszu5g834.jpg "/>

Error one: Due to incorrect time zone settings in PHP;

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6E/CC/wKiom1WIIZyxst4cAAitRffzy2A631.jpg "style=" float: none; "title=" 11.png "alt=" Wkiom1wiizyxst4caaitrffzy2a631.jpg "/>

Workaround: Modify the/etc/php.ini file, just set the Date.timezone=asia/shanghai, such as:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6E/C9/wKioL1WII1PT5mEkAAJDHMwDZyE298.jpg "style=" float: none; "title=" 12.png "alt=" Wkiol1wii1pt5mekaajdhmwdzye298.jpg "/>

Error two: GD and PHP-GD These two packages are not installed can also lead to errors, the solution is simple yum install-y gd PHP-GD installed on these two packages can!


It's all right! A simple log server is deployed, the specific use of our own according to the actual production needs to improve the research, I just finished the basic configuration, if there is nothing to summarize the place, but also asked Heroes to shoot bricks!

This article is from the "Flying Snail" blog, please be sure to keep this source http://ljmsky.blog.51cto.com/2878/1664241

Linux logs: Rsyslog and Loganalyzer (ii)

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.