write in front: If this article is fortunate enough to be seen by a friend and found wrong, I hope to criticize. If you do not understand the place, we would like to discuss together.
Installing Apache
On CentOS6.5, Apache is already installed by default. If it is not installed, proceed as follows to install the following steps:
# yum-y Install httpd
Start the httpd service
# service httpd Start
Setting up the HTTPD service boot
# Chkconfig httpd on
Test httpd
Type the IP address of your server in the browser, such as to obtain the following results to prove the success of the test
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/46/B9/wKiom1P0GG7Cc9MrAAFv_LZD_Ns580.jpg "title=" Figure 1 "alt = "Wkiom1p0gg7cc9mraafv_lzd_ns580.jpg"/>
Install MySQL
Installing MySQL and Mysql-server
# yum-y Install MySQL Mysql-server
Start Mysqld and Rsyslog services
# service Mysqld Start
Setting up mysqld and Rsyslog services boot up
# Chkconfig Mysqld on
Setting a login password for a database
# mysqladmin-u root password ' ... '
Test database
# mysql-u Root-p
Enter Password:
Welcome to the MySQL Monitor. Commands End With; or \g.
Your MySQL Connection ID is 3
Server version:5.1.71 Source Distribution
Copyright (c) and/or, Oracle, its affiliates. All rights reserved.
Oracle is a registered trademark of the Oracle Corporation and/or its
Affiliates. Other names trademarks of their respective
Owners.
Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement.
Mysql>
Install PHP
Installing Php,php-mysql and PHP-GD
# yum-y Install PHP php-mysql PHP-GD
editing PHP Test files
# vim/var/www/html/index.php
<?php
Phpinfo ();
?>
Restart HTTPD Service
# Service httpd Restart
Test PHP functionality
Open your browser, type your IP address/index.php, for example: 10.170.2.100/index.php, if you get the following results, prove that PHP functional test success
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/46/B9/wKiom1P0HNfTqjYtAAKo-aEmT54791.jpg "title=" Figure 2 "alt = "Wkiom1p0hnftqjytaako-aemt54791.jpg"/>
Installing Rsyslog
By default, Rsyslog is already installed
Installing Rsyslog-mysql
# yum-y Install Rsyslog-mysql
Start the Rsyslog service
# service Rsyslog Start
Setting up the Rsyslog service boot
# Chkconfig Rsyslog on
Use Createdb.sql to create the database on which the rsyslog depends
# Mysql-u Root-p </usr/share/doc/rsyslog-mysql-5.8.10/createdb.sql
Authorizing Rsysloguser users to invoke a database
Mysql> GRANT all on syslog.* to [e-mail protected] identified by ' ... ';
Mysql> GRANT all on syslog.* to [e-mail protected] identified by ' ... ';
mysql> FLUSH privileges;
Edit rsyslog.conf
Enable the following two sections:
# provides UDP syslog reception
$ModLoad IMUDP
$UDPServerRun 514
# provides TCP syslog reception
$ModLoad imtcp
$InputTCPServerRun 514
Add the following sections:
$ModLoad Ommysql
Modify the following section (the following two lines are in the same line, ...). Password for the user):
*.info;mail.none;authpriv.none;cron.none:ommysql:127.0.0.1,syslog,r Sysloguser,......
Download Analyzer and install
Download Analyzer
wget http://download.adiscon.com/loganalyzer/loganalyzer-3.6.5.tar.gz
Unzip loganalyzer-3.6.5.tar.gz to/var/www/html/
# Tar XF loganalyzer-3.6.5.tar.gz-c/var/www/html/
Copy the installation file to Apache
# cd/var/www/html/
# mkdir Log
# cp-r loganalyzer-3.6.5/src/* log/
# Cp-r loganalyzer-3.6.5/contrib/* L
Enter the log directory and set permissions on the associated file
# CD log/
# chmod +x configure.sh secure.sh
#./configure.sh
#./secure.sh
# chmod 666 config.php
# chown-r Apache.apache./*
Installing analyzer
In the browser type your IP address/log, for example: 10.170.2.100/log, you can get the following page
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/46/BC/wKioL1P0JtODWGiNAACeeW1-kPk445.jpg "title=" Figure 3 "alt = "Wkiol1p0jtodwginaaceew1-kpk445.jpg"/>
Click here to get the following page
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/46/BC/wKioL1P0J63hA-ePAADt1e1nF-A732.jpg "title=" Figure 4 "alt = "Wkiol1p0j63ha-epaadt1e1nf-a732.jpg"/>
Click Next to get the following page
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/46/BB/wKiom1P0J2STbllGAADoyKO-ezE573.jpg "title=" Figure 5 "alt = "Wkiom1p0j2stbllgaadoyko-eze573.jpg"/>
Click Next to get the following page
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/46/BD/wKioL1P0KbaBJcT_AAFgadeJZbo026.jpg "title=" Figure 6 "alt = "Wkiol1p0kbabjct_aafgadejzbo026.jpg"/>
Select the No and click Next to get the following page
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/46/BD/wKioL1P0KubC0br3AAFVD7dEPvY749.jpg "title=" Figure 7 "alt = "Wkiol1p0kubc0br3aafvd7depvy749.jpg"/>
Select the MySQL native option in the Source Type column and type the database information and click Next to get the following page
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/46/BD/wKioL1P0LD6y5BK4AAC9d-Vm9LA221.jpg "title=" Figure 8 "alt = "Wkiol1p0ld6y5bk4aac9d-vm9la221.jpg"/>
Click on the finish, you can get the following page
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/46/BC/wKiom1P0LZKSNEJIAAHBxs5Qavk190.jpg "title=" Figure 9 "alt = "Wkiom1p0lzksnejiaahbxs5qavk190.jpg"/>
Next, you'll be able to view the log information in the