In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
How to use LogAnalyzer to achieve a log system, I believe that many inexperienced people do not know what to do. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
I. deploy the LAMP environment
1. Install the CentOS operating system, system version number 6.5,
2. Install rsyslog, as shown in the following figure:
3. Install mysql, as shown in the following figure:
4. Install http, as shown in the following figure:
5. Install php, as shown in the following figure:
Second, configure server background applications
1. Create a database user
Mysqladmin-uroot password''
2. Import the database
Cd / usr/share/doc/rsyslog7-mysql-7.4.10/
Mysql-uroot-p
< createDB.sql 3、数据库授权 mysql>Grant all privileges on Syslog to @ localhost identified by''
Mysql > grant all on Syslog.* to @ localhostidentified by''
Mysql > flush privileges
4. Configure rsyslog.conf
Add the following fields
$ModLoad ommysql
*. *: ommysql:localhost,Syslog
Uncomment the following fields
$ModLoad immark
/ / immark is the module name, and log marking is supported.
$ModLoad imudp
/ / imupd is the name of the module and supports udp protocol
$UDPServerRun 514
/ / allow port 514 to receive logs forwarded using UDP and TCP protocols
Edit / etc/bashrc to add the following fields
Export PROMPT_COMMAND=' {msg=$ (history 1 | {read x y; echo $y;}); logger "[euid=$ (whoami)]": $(whoami): [`pwd`] "$msg";}'
Make it effective.
Source / etc/bashrc
5. Download 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 / var/www/html/loganalyzer
Rsync-a src/* / var/www/html/loganalyzer/
Third, install LogAnalyzer
1. Open the browser to access: http://192.168.1.107/loganalyzer/, as shown in the following figure:
Prompt that there is no configuration file, click here to use the wizard to generate.
2. The first step is to test the system environment, as shown below:
3. Click "Next" to enter the second step, as shown in the following figure:
4. Step 3, basic configuration, as shown below:
In User Database Options, fill in the parameters set above, and then click Next.
Step 4, create the table, as shown in the following figure:
Click Next to start creating the table.
Step 5, check the SQL results, as shown in the following figure:
Step 6, create an administrative user, as shown in the following figure:
Step 7: create the first Syslog source, as shown in the following figure:
Step 8, complete, as shown in the following figure:
After reading the above, have you mastered how to implement a log system using LogAnalyzer? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.