mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "logcheck-*" -exec rm -r {} \;
find -maxdepth 1 -type d -name "logsentry-*" -exec rm -r {} \;
tar xzvf ~/logcheck-1.1.1.tar.gz
cd logcheck-1.1.1
test $UID = 0 && chown -R root:root .
# If you only want to build and install logtail (not the logtail scripts),
# run these two lines instead of 'make linux':
# cc -O -o ./src/logtail ./src/logtail.c
# su -c "install -s src/logtail /usr/local/bin/"
# Become root to install and configure it
su
make linux
# Set a cron job like this to run it every hour. If you run a log rotater
# at midnight, make sure this runs right before the log rotater does.
# You may want to run logcheck every hour from 1am through 11pm and run
# "/usr/local/etc/logcheck.sh ; /usr/local/sbin/logrotater" at midnight.
# 0 * * * * /usr/local/etc/logcheck.sh
# You can just create a /etc/cron.hourly/logcheck script, but then it won't
# run at the top of the hour.
# Open up /usr/local/etc/logcheck.sh in a text editor and:
#
# o Remove directories that don't exist (/usr/ucb) from the PATH line (line 34)
# o Set the SYSADMIN line to the e-mail address you'd like logcheck e-mails to
# go to (I usually create a logcheck alias)
# o Uncomment the line that specifies the line to use (line 166)
# o Comment-out the RedHat lines (169, 170, 171)