当前位置:网站首页>Display logs in the database through loganalyzer
Display logs in the database through loganalyzer
2022-06-12 13:49:00 【wwzroom】
1. Experimental framework 
2. Environmental preparation
- A log server , Use the previous case to realize ,IP:10.0.0.18,
- A database server , Use the previous case to realize ,IP:10.0.0.28
- One pawn httpd+php The server , And install loganalyzer Exhibition web graphics ,IP:10.0.0.38
3. Implementation steps
1) stay rsyslog Install connections on the server mysql Module related packages
1.[[email protected]:~]#
yum -y install rsyslog-mysql
2. Copy to the database host , Import database , This database will be generated , Specially store log files
[[email protected]:~]#
scp /usr/share/doc/rsyslog/mysql-createDB.sql 10.0.0.28:/data
3. Configure the server to send logs to the specified database
[[email protected]:~]#
vim /etc/rsyslog.conf
####MODULES#### # stay MODULES Add the corresponding module under the language ,
module(load="ommysql")
.......... Omit ........
# Don't log private authentication messages!
*.info;mail.none;authpriv.none;cron.none /var/log/messages
*.info;mail.none;authpriv.none;cron.none :ommysql:10.0.0.28,Syslog,rsyslog,123456 # Add this line , The log is stored in the specified remote database .
[[email protected]:~]#
systemctl restart rsyslog
2) Get ready MySQL Host installation MySQL, And create an account , to grant authorization
1.[[email protected]:~]#
yum -y install mysql-server
[[email protected]:~]#
systemctl enable --now mysqld
2. Import the transferred file data
mysql> source /data/mysql-createDB.sql
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| Syslog |
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
3. Create a remote account for login and authorize
mysql> create user [email protected]'10.0.0.%' identified by '123456';
mysql> grant all on Syslog.* to 'rsyslog'@'10.0.0.%';
3) stay 10.0.0.38 Installed on the host httpd, php And related software packages
1.[[email protected]:~]#
yum -y install httpd php-fpm php-mysqlnd php-gd
2.[[email protected]:~]#
systemctl enable --now httpd php-fpm php-gd
3. Download installation package
[[email protected]:~]#
wget https://download.adiscon.com/loganalyzer/loganalyzer-4.1.12.tar.gz
4. Compress the package and unzip it to html in
[[email protected]:/var/www/html]#
tar xvf loganalyzer-4.1.12.tar.gz
[[email protected]:/var/www/html]#
mv ./loganalyzer-4.1.12/src/ /var/www/html/log
[[email protected]:/var/www/html]#
touch /var/www/html/log/config.php
[[email protected]:/var/www/html]#
chmod 666 /var/www/html/log/config.php
5. Browser access operations http://10.0.0.38/log Conduct web Set up
6. Recycling permissions
[[email protected]:/var/www/html]#
chmod 644 /var/www/html/log/config.php


边栏推荐
- Real time software source code of COVID-19
- How to solve the problem of data table query error when SQLite writes the registration function?
- 618 entered the second half of the period, apple occupied the high-end market, and the domestic mobile phones finally undercut the price competition
- The problem of Joseph in Informatics
- jupyternotebook有汉字数据库吗。在深度学习中可以识别手写中文吗
- Codeforces 1629 B. GCD arrays - simple thinking
- 阿裏雲開發板HaaS510報送設備屬性
- Codeforces 1637 C. Andrew and stones - simple thinking
- 数据类型转换和条件控制语句
- Informatics Olympiad all in one 1000: introductory test questions
猜你喜欢

Understanding recursion
![[video lesson] a full set of tutorials on the design and production of Android studio Internet of things app -- all mastered during the National Day](/img/8d/3bfb5d2798797be3e0b10e25c978d3.png)
[video lesson] a full set of tutorials on the design and production of Android studio Internet of things app -- all mastered during the National Day

Possible solutions to problems after CodeBlocks installation

Create a small root heap and judge the node relationship (also.C\u str() substr(),atoi(),string. Use of find())

【mysql进阶】mysql索引数据结构的演变(四)

go-zero 微服务实战系列(二、服务拆分)

Implementing pytorch style deep learning framework similartorch with numpy

Now you must know the pointer

高通平台开发系列讲解(协议篇)QMI简单介绍及使用方法

Overview of embedded system 2- composition and application of embedded system
随机推荐
Cdeforces 1638 C. inversion graph - simple thinking
FFmpeg 学习指南
Innovation training (XII) project summary
Code debugging - print log output to file
C language array and pointer
Codeforces 1629 E. grid XOR - simple thinking
Implementing singleton mode of database under QT multithreading
Codeforces 1637 E. best pair - Thinking
将字符串转为16进制字符串并显示出来
[semidrive source code analysis] [x9 chip startup process] 26 - LK of R5 safetyos_ INIT_ LEVEL_ Target phase code flow analysis (TP drvier, audio server initialization)
Implementing tensorflow deep learning framework similarflow with numpy
VGA display color bar and picture (FPGA)
Teach you how to create SSM project structure in idea
Does jupyternotebook have a Chinese character database. Can you recognize handwritten Chinese in deep learning
Computational hierarchy -- the problem of large numbers multiplying decimals
Codeforces 1637 C. Andrew and stones - simple thinking
Innovation training (XI) summary of some bugs in the development process
Introduction to color coding format
2061: [example 1.2] trapezoidal area
[WUSTCTF2020]颜值成绩查询-1