The logrotate utility is designed to simplify the administration of log files on a system which generates a lot of log files.
How to build and install logrotate on HP-UX 11.00 (these instructions should
also work on HP-UX 10.20):
Obtain and install the following GNU packages for HP-UX:
binutils 2.9.1
gcc 2.95.2
make 3.78.1
I used the packages at the Software Porting and Archive Centre for HP-UX
at http://hpux.cs.utah.edu/.
Obtain and install the following GNU/Linux to HP-UX Porting package:
libhplx library
See http://devresource.hp.com/LPK/index.html for downloads.
This library is needed to provide the ??? function.
Obtain, build, and install popt 1.4 (there doesn’t seem to be a build at
the Porting Centre.)
See ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/popt-1.6.4.tar.gz
Install it into the directory of your choice (i.e.
“./configure --prefix=/opt/popt”).
Build logrotate, telling it where to find popt and hplx installation. The
POPT_DIR defaults to /usr/local and HPLX_DIR defaults to /usr/local/hplx:
gmake POPT_DIR=/usr/local HPLX_DIR=/usr/local/hplx
Install logrotate into your desired directory (BASEDIR defaults to
/usr/local):
gmake install BASEDIR=/usr/local
Copy the configuration files into your desired location.
cp examples/logrotate.conf /etc/logrotate.conf
mkdir /etc/logrotate.d
cp examples/?tmp /etc/logrotate.d
Set up a cron job to run logrotate daily. See examples/logrotate.cron.
I also recommend setting CLEAN_ADM=0 in /etc/rc.config.d/clean, and
setting up an init script to use logrotate for this instead. This way,
logrotate manages all logfile pruning.
Questions, comments, abuse to:
Paul D. Gear [email protected], [email protected]
Danial M. Howard [email protected], [email protected]