In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to configure / var/log/messages for Ubuntu system logs. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
1. Problem description
You need to check the log file of the Ubuntu system today, but you can't find the / var/log/messages file. Search for information on the Internet, it is said to configure / etc/syslog.conf. Syslog adopts a configurable and unified system registration program to accept log requests from all parts of the system at any time, and then write the log information into the corresponding file, mail it to a specific user or send it directly to the console according to the preset settings in / etc/syslog.conf.
Okay, here's the problem again. There is still no / etc/syslog.conf in the system, after a search, the final conclusion is: the corresponding under Ubuntu should be / etc/rsyslog.conf and rsyslogd.
two。 Solution
For more information on the functions of syslog.conf files and files under syslog.d, please refer to the following article:
Http://www.linuxidc.com/Linux/2012-03/56434.htm
By looking at the rsyslog.conf file, you can see that all the configuration files are in the / etc/rsyslog.d/ folder.
# / etc/rsyslog.conf Configuration file for rsyslog.
#
# For more information see
# / usr/share/doc/rsyslog-doc/html/rsyslog_conf.html
#
# Default logging rules can be found in / etc/rsyslog.d/50-default.conf
... ...
#
# Include all config files in / etc/rsyslog.d/
#
$IncludeConfig / etc/rsyslog.d/*.conf
Open the / etc/rsyslog.d/50-default.conf file with vim and add a line as follows:
* .info;mail.none;authpriv.none;cron.none / var/log/messages
Restart the system, then check the system log and find that it is already okay! ^ _ ^
This is the end of the article on "how to configure Ubuntu Syslog / var/log/messages". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.