[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 297
  • Last Modified:

How do I keep apache upgrades in Centos from creating logrotate.d\http files

We do not use logrotate for http apache.  So we took out the http file from logrotate.d   But everythime apache upgrades it puts it back.  I need it to stay gone, or not do anything if it is there.
Please help
0
jpjordan4
Asked:
jpjordan4
  • 3
2 Solutions
 
PapertripCommented:
The easiest way would be to just rm the file after upgrading Apache, as one generally does not update Apache that often, especially if they are using yum repos for that package.  You would just need to make sure that cron.daily doesn't run from the time you upgrade until you delete the file.

You could setup a cron job to see if that file exists, and rm it if it does.

You could remove the following line from /etc/logrotate.conf and replace it with filenames of the logs you do want to process, like
include /etc/logrotate.d/named
include /etc/logrotate.d/syslog

Open in new window

0
 
ravenplCommented:
Do not remove /etc/logrotate.d/httpd - just clear or comment out its content. This way apache upgrades will rather create /etc/logrotate.d/httpd.rpmnew instead overwriting it.
0
 
PapertripCommented:
Good catch ravenpl, it makes sense now that I think about it.  Will remember that one!

 tabooext [+] list
              The  current  taboo  extension  list is changed (see the include directive for information on the taboo
              extensions). If a + precedes the list of extensions, the current taboo  extension  list  is  augmented,
              otherwise  it  is replaced. At startup, the taboo extension list contains .rpmorig, .rpmsave, ,v, .swp,
              .rpmnew, ~, .cfsaved and .rhn-cfg-tmp-*.

Open in new window

0
 
PapertripCommented:
@jpjordan4

While my answers technically will work, ravenpl's is definitely the cleanest way to do it.
0
 
jpjordan4Author Commented:
Thank you for the quick response.  It seems that yum updates to apache do happen fairly frequently and I always manage to forget to remove the file on at least one server.  I think you guidance will help.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now