Using logrotate to manage logfiles
In this recipe we will consider the practice of log rotation in order to learn how to improve the functionality and overall performance of the entire system.
Logfiles provide information on the health of your system and assist you in troubleshooting specific difficulties with a service or software application. They can be stored on a separate partition, but during the lifetime of your server, large logfiles can often become too difficult to search, inflate backups, or minimize the known disk space on your system. Logfiles are vital to your role as a server administrator, and as an out-of-control logfile can only serve to hinder, it is the purpose of this recipe to show you how to use a feature known as logrotate in order to keep your system in check.
Getting ready
To complete this recipe you will require a minimal installation of the CentOS 6 operating system with root privileges and a console-based text editor of your choice.
How to do it...
Logrotate is installed...