In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
CentOS6 logs are kept for 4 weeks by default, which is too short. In order to keep the log longer, the modification period is 24 months from 4 weeks.
1. Modify configuration logrotate.conf
[root@D65 etc] # vi / etc/logrotate.conf
-- # rotate log files weekly
# # weekly
Monthly
-- # keep 4 weeks worth of backlogs
# # rotate 4
Rotate 24
two。 Restart the service syslog
[root@D65 etc] # service rsyslog restart
Shutting down system logger: [OK]
Starting system logger: [OK]
[root@D65 etc] # service-- status-all | grep log
Query logging is ON
Rsyslogd (pid 5342) is running...
3. Show Log
-- # tail / var/log/messages
[root@D65 etc] # tailf / var/log/messages
Sep 12 10:44:58 D65 kernel: Kernel logging (proc) stopped.
Sep 12 10:44:58 D65 rsyslogd: [origin software= "rsyslogd" swVersion= "5.8.10" x-
Pid= "1361" x http://www.rsyslog.com"] exiting on signal 15.
Sep 12 10:44:58 D65 kernel: imklog 5.8.10, log source = / proc/kmsg started.
Sep 12 10:44:58 D65 rsyslogd: [origin software= "rsyslogd" swVersion= "5.8.10" x-
Pid= "5342" x murf = "http://www.rsyslog.com"] start"
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.