I'm new to Linux but I'm about to start using a VPS to host my website. I've been reading about and it's been mentioned that I need to make sure that all of my logs are rotating and compressed, but I don't understand how to do that. I'll be using Plesk but I understand that it will only cover a few logs, so how do I make sure that all my logs are rotated? And is there an easier way to view them than by using grep/cat?
How to manage all logs on VPS
centos;logs;logrotate
To flesh out what EightBitTony points out about logrotate:logrotate is a stand alone program you can run from the command-line.  The primary documentation would be the man page (man logrotate) which has a section about the format of the CONFIGURATION FILE.  There is no default config file; it must be specified.  Usually logrotate is run via cron, so you'll find a reference to it in your cron configuration (along with the explicit logrotate config file).  On fedora derived things like CentOS, it is probably /etc/logrotate.conf.  However, logrotate also allows for an include directive.  You'll notice in the CONFIGURATION FILE section of the man page (under Here is more information on the directives which may be included in a logrotate configuration file):include [file_or_directory]Reads the file given as an argument as if it was included inline where  the include directive appears. If a directory is given, most of the  files in that directory are read in alphabetic order before processing  of the including file continues. The only files which are ignored are  files which are not regular files (such as directories and named  pipes) and files whose names end with one of the taboo extensions, as  specified by the tabooext directive.This is of interest since directives can supersede (contradict and override) one another, and they are processed inline; from the beginning of that section: each configuration file can set global options (local definitions override global ones, and later definitions override earlier ones) so if you include a file then contradict a directive in it, this last directive wins.  Get used to reading man pages!  They are your friend!If you look at your /etc/logrotate.conf, you'll probably find a line like this;include /etc/logrotate.dAnd /etc/logrotate.d will be a directory.  This allows individual applications to add files there so their individual logs can be rotated appropriately.  Obviously you can add your own and modify whatever you want.There are logrotate tutorials around if you find the man page a little dense initially.  It's a great tool. The easiest thing to do is set up an experimental conf file outside the default directory that you can run by specifying that on the command-line.  Make it refer to something specific so you don't create a mess whilst experimenting, and you should be able to get a handle on how things work that way.Note that you don't have to run logrotate via cron; you can do it manually or via some other method depending on how you prefer to administer the server.