Logrotate - /etc/logrotate.conf does't exist

Hi Admins.

I have installed logrotate rpm on Aix 6.1.
After the installation of rpm, I don't find /etc/logrotate.conf file and /etc/logrotate.d dir .

The config file is located in /opt/freeware/etc/logrotate.conf.

When I ran

logrotate -v /opt/freeware/etc/logrotate.conf

I get below error:

phcxxxx:/opt/freeware/etc/logrotate.d > logrotate -v /opt/freeware/etc/log>       
reading config file /opt/freeware/etc/logrotate.conf                                 
including /etc/logrotate.d                                                           
error: cannot stat /etc/logrotate.d: No such file or directory                       
removing last 0 log configs                                                          
phcxxxx:/opt/freeware/etc/logrotate.d >                                           

your errors is exactly because of the missing /etc/logrotate.conf and /etc/logrotate.d ...

your options:

(1) create a symlink for /opt/freeware/etc/logrotate.conf into /etc/logrotate.conf and /opt/freeware/etc/logrotate.d into /etc/logrotate.d

(2) manually create /etc/logrotate.d and copy /opt/freeware/etc/logrotate.conf into /etc/logrotate.conf

i would suggest creating the symlinks first and see if that works as that way is cleaner and you do not have to worry about maintaining 2 versions of the logrotate.conf file ...

btw, you might also want to consult the logrotate man page ...

1 Like

Thank you!!. It looks fixed it.