Warning: Use of undefined constant is_home - assumed 'is_home' (this will throw an Error in a future version of PHP) in /u/r/rgreenwald/websites/www.russgreenwald.com/docroot/wp-content/plugins/different-posts-per-page/diff-posts-per-page.php on line 151

Warning: Use of undefined constant posts_per_page - assumed 'posts_per_page' (this will throw an Error in a future version of PHP) in /u/r/rgreenwald/websites/www.russgreenwald.com/docroot/wp-content/plugins/different-posts-per-page/diff-posts-per-page.php on line 151

Warning: Use of undefined constant is_category - assumed 'is_category' (this will throw an Error in a future version of PHP) in /u/r/rgreenwald/websites/www.russgreenwald.com/docroot/wp-content/plugins/different-posts-per-page/diff-posts-per-page.php on line 152

Warning: Use of undefined constant posts_per_page - assumed 'posts_per_page' (this will throw an Error in a future version of PHP) in /u/r/rgreenwald/websites/www.russgreenwald.com/docroot/wp-content/plugins/different-posts-per-page/diff-posts-per-page.php on line 152

Warning: Use of undefined constant is_archive - assumed 'is_archive' (this will throw an Error in a future version of PHP) in /u/r/rgreenwald/websites/www.russgreenwald.com/docroot/wp-content/plugins/different-posts-per-page/diff-posts-per-page.php on line 153

Warning: Use of undefined constant posts_per_page - assumed 'posts_per_page' (this will throw an Error in a future version of PHP) in /u/r/rgreenwald/websites/www.russgreenwald.com/docroot/wp-content/plugins/different-posts-per-page/diff-posts-per-page.php on line 153

Warning: Use of undefined constant is_search - assumed 'is_search' (this will throw an Error in a future version of PHP) in /u/r/rgreenwald/websites/www.russgreenwald.com/docroot/wp-content/plugins/different-posts-per-page/diff-posts-per-page.php on line 154

Warning: Use of undefined constant posts_per_page - assumed 'posts_per_page' (this will throw an Error in a future version of PHP) in /u/r/rgreenwald/websites/www.russgreenwald.com/docroot/wp-content/plugins/different-posts-per-page/diff-posts-per-page.php on line 154

Warning: Use of undefined constant is_tag - assumed 'is_tag' (this will throw an Error in a future version of PHP) in /u/r/rgreenwald/websites/www.russgreenwald.com/docroot/wp-content/plugins/different-posts-per-page/diff-posts-per-page.php on line 155

Warning: Use of undefined constant posts_per_page - assumed 'posts_per_page' (this will throw an Error in a future version of PHP) in /u/r/rgreenwald/websites/www.russgreenwald.com/docroot/wp-content/plugins/different-posts-per-page/diff-posts-per-page.php on line 155

Warning: Use of undefined constant is_tag - assumed 'is_tag' (this will throw an Error in a future version of PHP) in /u/r/rgreenwald/websites/www.russgreenwald.com/docroot/wp-content/plugins/different-posts-per-page/diff-posts-per-page.php on line 292
Logrotate | Russ Greenwald

Logrotate

Logrotate is an amazing tool for linux admins.  It is service called by cron in the daily cron job.  Logrotate gives you options on how you want to manage any log file.

  • Archive
  • Compress
  • Reset
  • etc.

To configure logrotate for specific log files from Apache, tomcat, subversion, hudson, etc.

  • Go to /etc/logrotate.d
  • Create seperate configuration files for each application’s log file
  • /var/log/http/* { create 0640 apache apache   #This line defines who is going to own the new log file after the old one is archived and compressed missingok daily # Run this daily rotate 7 # Rotate logs every 7 days, from line above compress # Compress log files }
  • Save and check.  To test “logrotate -f /etc/logrotate.d/filename”

Comments are closed.