HP StorageWorks File Migration Agent V2.1 administrator guide (T4274-96105, October 2006)

File Migration Agent administrator guide 131
Configuration for LogRotate
LogRotate is a utility for managing log files. The VSFTPD Server is normally configured to write the log
file: /var/log/vsftpd.log. To avoid an uncontrolled growth of this file, LogRotate is used. On SuSE
Linux, LogRotate should be installed by default.
To setup LogRotate, the following steps must be executed:
1. Create the file: /etc/cron.daily/logrotate.
2. Make the file executable.
3. Create the file: /etc/logrotate.d/fma
Configuration of VSFTPD on Red Hat Linux
1. If you have performed a Red Hat standard installation, vsftpd will probably not be installed on the
system (check whether /usr/sbin/vsftpd exists).
To install vsftpd afterwards you have to mount Red Hat Installation CD #1 and change into directory
RedHat/RPMS where you can find the package vsftpd-1.2.1-3.i386.rpm, which can be
added to the system by performing.
2. If vsftpd installation has succeeded you can continue creating a technical user and group:
Creating the group fma:
3. Creating the technical user fma_user:
/etc/cron.daily/logrotate
#!/bin/sh
/usr/sbin/logrotate /etc/logrotate.conf
chmod +x /etc/cron.daily/logrotate
/etc/logrotate.d/fma
# Configuration for logrotate
/var/log/vsftpd.log
{
compress
size=500M
rotate=5
}
Table 40 Parameters for LogRotate command
Parameter Description
compress Old versions of log files are compressed with gzip by default.
size[=]size Log files are rotated when they grow bigger then size bytes. If size is followed by M, the
size if assumed to be in megabytes. If k is used, the size is in kilobytes. Therefore,
size 100, size 100k, and size 100M are all valid.
rotate[=]count Log files are rotated count times before being removed. If count is 0, old versions are
removed rather than rotated.
rpm -ivh vsftpd-1.2.1-3.i386.rpm
groupadd fma